Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description on properties missing if they have $ref #652

Open
programm-ingovals opened this issue Mar 9, 2024 · 1 comment
Open

Description on properties missing if they have $ref #652

programm-ingovals opened this issue Mar 9, 2024 · 1 comment

Comments

@programm-ingovals
Copy link

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",

@garg-mudit
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants