swagger-api/swagger-codegen
Auf GitHub ansehen[Question] Can I define the response-example
Open
#3.907 geöffnet am 30. Sept. 2016
Enhancement: FeatureGeneral: Questionhelp wanted
Repository-Metriken
- Stars
- (12.701 Stars)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
Description
Can I define the response-example in swagger.json, and use codeGen to mock the request and the response.As example: I define the result of the api [GET]/pet/{petId}, and the pet's name is "xiaoming" of the invoke result.I hope to get the result as this: {name:"xiaoming"}. Also ,I hope to get the result as {name: "xiaohong"} when I define the pet's name as "xiaohong". Is there any feature like this in swagger-editor or codegen? Thank you for your reply very much!!!