-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: add option to hide the example code when using the SchemaDefinition
component
#2157
feat: add option to hide the example code when using the SchemaDefinition
component
#2157
Conversation
Hi @andre-stoesel, thanks for your contribution. Can you add some examples of usage(definition) and screenshots for it? |
An example is one of our web services. (Unfortunately the documentation is not finished and approved yet, so I can't link it here). In our case the schema to be displayed corresponds to a configuration file in XML format. Since the Changing the - name: pet_model
x-displayName: The Pet Model
description: |
<SchemaDefinition schemaRef="#/components/schemas/Pet" showExample={false} /> As you can see, the example in the gray right side of the page is not displayed. |
What/Why/How?
This change allows hiding the examples of a schema definition.
This is useful if the schema is not part of the API but an external resource like a configuration file. As these may have to be created in a different format, a
json
example would only confuse the user.Reference
Testing
Screenshots (optional)
Check yourself