You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting from swagger 2.0 to openApi 3.x, none of the properties of the "200" response type (apart from the basic top-level ones) are converterd - it simple gives all the top level properties (transactionDetail, inquiryDetail, blockStatus, organization) as objects with additionalProperties: true
Output
openapi: 3.0.1info:
title: Data Blocksdescription: The Data Block API is intended to vend Data Blocks to customers transactionallybased on a request for a single DUNS.version: "1"servers:
- url: https://plus.dnb.com/paths:
/v1/data/duns/{dunsNumber}:
get:
tags:
- dataBlockssummary: Endpointdescription: The Data Block API is intended to vend Data Blocks to customerstransactionally based on a request for a single DUNS.operationId: dataBlocksparameters:
- name: Authorizationin: headerdescription: The access token provided by authentication.required: trueschema:
type: stringexample: Bearer alphanumerictoken
- name: dunsNumberin: pathdescription: A 9-character numeric string identifying the entity by its Dun& Bradstreet D-U-N-S number.required: trueschema:
type: stringexample: "804735132"
- name: blockIDsin: querydescription: "The block ID provided by Dun & Bradstreet that identifies the\\ data block to be returned.<br/><br/>Multiple values can be included, separated\\ by commas."required: trueschema:
type: stringexample: blockID
- name: tradeUpin: querydescription: "Indicates if the Headquarters D-U-N-S Number should be returned\\ if a Branch is requested.<br/><br/>Valid values:<br/>* hq: If the provided\\ D-U-N-S Number is a Branch, the Headquarter D-U-N-S Number is returned.<br/>*\\ domhq: If the provided D-U-N-S Number is a Branch, the Domestic Headquarter\\ D-U-N-S Number is returned.<br/><br/>If the requested D-U-N-S Number is\\ not a Branch, that D-U-N-S Number will be returned regardless of the value\\ of this parameter.<br/><br/>If the parameter is omitted, the requested\\ D-U-N-S Number is returned even if it is a Branch."schema:
type: stringexample: hq
- name: customerReferencein: querydescription: Up to 240 characters for a reference string to be linked to therequest in order to support subsequent order reconciliation.schema:
type: stringexample: customer reference textresponses:
"200":
description: OKcontent:
application/json;charset=utf-8:
schema:
type: objectproperties:
transactionDetail:
type: objectadditionalProperties: truedescription: The information used to process this request.inquiryDetail:
type: objectadditionalProperties: truedescription: The criteria used to process this request.blockStatus:
type: arraydescription: Records the status of the data blocks requested bythe customer.items:
type: objectadditionalProperties: trueorganization:
type: objectadditionalProperties: truedescription: The details of the entity.description: """301":
description: Moved Permanentlyheaders:
location:
description: The URL to retrieve the D-U-N-S Number to which the requestedD-U-N-S Number was transferred.schema:
type: stringcontent:
application/json;charset=utf-8:
schema:
type: objectdescription: ""security: []x-monitoring: "Available except \"Business Activity Insights\", \"Derived Trade\\ Insights\", \"Inquiry Insights\", \"Company Information Advanced Geoposition\\ Side Block\", \"Hierarchies & Connections ELI Side Block\". Please refer\\ <a href=\"/html/guides/Monitor/DataProducts.html\" target=\"_blank\">guide</a>\\ for details."x-monitoring-pdf: "Available except \"Business Activity Insights\", \"Derived\\ Trade Insights\", \"Inquiry Insights\", \"Company Information Advanced Geoposition\\ Side Block\", \"Hierarchies & Connections ELI Side Block\". Please refer\\ guide for details."x-DNB-Name: "Data Blocks (companyinfo_L1_v1, hierarchyconnections_L1_v1)"x-DNB-ID: dataBlockscomponents: {}x-original-swagger-version: "2.0"
The converter converts all properties - or at least gives an error/feedback if the schema is incorrect (though it seems to parse and display the properties OK from the 2.0 version, which suggests that the input is valid
The text was updated successfully, but these errors were encountered:
Q&A
Content & configuration
Example Swagger/OpenAPI definition: https://pastebin.com/dbRtCgJF (too long for GH issue otherwise)
Swagger-Editor configuration options:
Default from https://editor-next.swagger.io/ and https://editor.swagger.io/
Describe the bug you're encountering
When converting from swagger 2.0 to openApi 3.x, none of the properties of the
"200"
response type (apart from the basic top-level ones) are converterd - it simple gives all the top level properties (transactionDetail
,inquiryDetail
,blockStatus
,organization
) asobject
s withadditionalProperties: true
Output
Steps to reproduce the behavior:
Expected behavior
The converter converts all properties - or at least gives an error/feedback if the schema is incorrect (though it seems to parse and display the properties OK from the 2.0 version, which suggests that the input is valid
The text was updated successfully, but these errors were encountered: