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

Generating description with $ref #3419

Closed
avantipande1 opened this issue Jan 17, 2020 · 6 comments
Closed

Generating description with $ref #3419

avantipande1 opened this issue Jan 17, 2020 · 6 comments

Comments

@avantipande1
Copy link

avantipande1 commented Jan 17, 2020

Home:
      type: object
      properties:
        home_address:
                 description: "its the home address"
                 $ref: '#/components/schemas/Address'
Office:
      type: object
      properties:
        office_address:
                 description: "its the office address"
                 $ref: '#/components/schemas/Address'

This is a kind of swagger I want to generate with annotations, where I can have specific descriptions for home and office addresses.
Is there anyway swagger-ui will read this description for $ref?

swagger-api/swagger-editor#1184 (comment)

This is one of the solution I found but there is no way to generate it with annotations.
Thanks

@webron
Copy link
Contributor

webron commented Jan 22, 2020

Currently, the OpenAPI specification does not support any additional attributes alongside a $ref, so there's nothing we can do about it. The next version of the spec will support it, but that's months away.

@avantipande1
Copy link
Author

Currently, the OpenAPI specification does not support any additional attributes alongside a $ref, so there's nothing we can do about it. The next version of the spec will support it, but that's months away.

Thanks Ron for the update.

@webron
Copy link
Contributor

webron commented Jan 22, 2020

Going to close this as there's nothing we can do about it.

@webron webron closed this as completed Jan 22, 2020
@DepickereSven
Copy link

DepickereSven commented May 31, 2021

It's supported in OpenAPI 3.1.0
Reference: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#referenceObject

@m1ks
Copy link

m1ks commented Jun 29, 2021

Hi, should we open this issue again since the feature is now supported in OpenAPI 3.1.0?

@yehor-manzhula
Copy link

@m1ks Here is the new issue #4013

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

5 participants