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

Documentation of relationships not included in export #107

Closed
nissimsan opened this issue Apr 1, 2020 · 4 comments
Closed

Documentation of relationships not included in export #107

nissimsan opened this issue Apr 1, 2020 · 4 comments

Comments

@nissimsan
Copy link

Documentation of relationships is not included in the export. This works fine for simple attributes, but not for (Composition) relationships.

image

image

@nissimsan
Copy link
Author

In the example included the documentation string "The consignee of this consignment." should have been included under consignee in the YAML.

@faizanvahevaria
Copy link
Contributor

faizanvahevaria commented Apr 2, 2020

@nissimsan
As you said i added 'description' field for the composition relationship in property and generate openapi (see Example : 1)

Example : 1

consignee:
          $ref: '#/components/schemas/Consignee'
          description: 'The consignee of this consignment. '

Then i saw warning in swagger editor like : (Warning : Sibling values alongside $ref are ignored. To add properties to $ref, wrap $ref into allOf, or move extra properties into the reference definition)

so as warning says
I suggest it should be parsed like

consignee:
          allOf:
            - $ref: '#/components/schemas/Consignee'
            - description: 'Consignee. '

So please let me know your confirmation how it should be exported.

And please let me know other places in the openapi where you seem to add 'description' fields.

@nissimsan
Copy link
Author

Hi @faizanvahevaria

Hmm, you're right. This is a limitation to the spec which I was not aware of.
OAI/OpenAPI-Specification#1514

I agree with your suggestion of adding the class description, please progress with this suggestion.

Hopefully the OpenAPI spec will be fixed as some point, and then we can bring over relationship-description as well.

Thank you Faizan!

@nissimsan
Copy link
Author

Thanks @faizanvahevaria !

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