oas-kit
oas-kit copied to clipboard
Description on properties missing if they have $ref
Checklist
- [*] Conversion: I have checked my source definition is valid OpenAPI 2.0
- [*] Conversion: On valid OpenAPI 2.0 input, the conversion looks wrong
Detailed Description
Source tidbit:
"NafnMaka": {
"description": "Nafn maka",
"type": "string"
},
"TekjurNamsmanns": {
"$ref": "#/definitions/TekjurContract",
"description": "Inniheldur eina færslu í fylki af tekjuskráningu námsmanns ef tekjuskráning finnst annars enga færslu"
},
Result tidbit:
NafnMaka:
description: Nafn maka
type: string
TekjurNamsmanns:
$ref: "#/components/schemas/TekjurContract"
Description is missing on all properties that have a $ref
Other stuff
Running npm package "swagger2openapi": "7.0.8",
For anyone stuck on this ,
there is an option called: refSiblings which can take values: 'remove', 'preserve', 'allOf'.
Use this option with value as 'preserve' and this will keep the descriptions as well.