-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Example value shows datatype inplace of actual value #3960
Comments
Specify the |
@hkosova definition is used more than 1 place and most places have different example values. So adding example values in schema is not that useful. For example take an option schema for an entities, the format is same but the values will be different for each entity. |
@gohelkiran30 You can try this ugly hack, it seems to work in the latest UI and Editor but I don't know if this will work in other tools (codegen, etc.) vehicleType:
allOf:
- $ref: '#/definitions/Option'
description: vehicle type
example:
id: 1
en: Car Or if you use OpenAPI 3.0, it lets you define separate examples for request bodies and response bodies. But these examples are not currently displayed in UI (#3437). |
Closing due to inactivity. This is simply to keep our issue tracker clean - feel free to comment if there are any further thoughts or concerns, and we'll be happy to reopen this issue. |
after update to version 3.4.4 the example value of an object is replaced with its data type, when uses definitions
Earlier response is like (in v2.2.6)
now it is changed to (in v3.4.4)
Demonstration API definition
Configuration (browser query string, constructor, config.yaml)
?yourQueryStringConfig=here
Expected Behavior
"vehicleType": {
"id": 1,
"en": "Car"
},
Current Behavior
"vehicleType": {
"id": 0,
"en": "string",
"aliases": [
"string"
]
},
Possible Solution
Context
api user cannot the example values
The text was updated successfully, but these errors were encountered: