question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generating description with $ref

See original GitHub issue
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?

https://github.com/swagger-api/swagger-editor/issues/1184#issuecomment-422044132

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
m1kscommented, Jun 29, 2021

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

3reactions
DepickereSvencommented, May 31, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Using $ref - Swagger
Local Reference – $ref: '#/definitions/myElement' # means go to the root of the current document and then find elements definitions and myElement one...
Read more >
Swagger: Add description with ref - Stack Overflow
i took advantage over the "Extensions" property of schema. and managed to create a swagger JSON, with $ref and extended properties. var ...
Read more >
Description is not allowed for elements containing $ref #1514
I know that specification says that when using $ref any other elements are ignored. So here a real life scenario. location: description: ...
Read more >
Object.create() - JavaScript - MDN Web Docs
The Object.create() method creates a new object, using an existing object as the prototype of the newly created object.
Read more >
Refs and the DOM - React
Creating Refs. Refs are created using React.createRef() and attached to React elements via the ref attribute. Refs are commonly assigned to an instance ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found