-
Notifications
You must be signed in to change notification settings - Fork 276
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
Provide a way to not auto-fill examples for certain parameters #686
Comments
I am not sure whats the ask here. Can you explain with some screen shot may be, what are you getting and what do you intent to have |
Sorry for any confusion. This is actually a defect that optional fields are pre-populated with first value from examples. Can provide example if needed. |
I have the same problem. I would like to somehow hint in yaml schema that field should not be populated from example. get:
summary: content search
operationId: seachContent
tags:
- content-search
parameters:
- in: query
name: search
examples:
a:
value: my example 1
b:
value: "*"
schema:
type: string
description: term to search (use "*" to show all)
- in: query
name: id
example: my-id
schema:
type: string
- in: query
name: db
example: ccc
schema:
type: string
enum:
- aaa
- bbb
- ccc
- ddd
responses:
200:
description: OK
content:
application/json: {}
400:
$ref: "../response/400.yaml" |
I think thats a good suggestion. |
use vendor extension get:
summary: content search
operationId: seachContent
tags:
- content-search
parameters:
- in: query
name: search
example: 'my-search-string'
x-fill-example: no # <--- vendor extension
schema:
type: string
description: term to search (use "*" to show all)
- in: query
name: id
example: my-id
schema:
type: string |
We have some optional fields with examples. But, they still getting populated with first value from examples. The default can be set only inside examples. But, that also shows up in examples. So, is it possible to allow setting default outside?
Current: To show empty default for non-required fields.
Proposed: Set default inside schema, so that it does not appear in examples.
The text was updated successfully, but these errors were encountered: