swagger-api/swagger-codegen

Codegen doesn't use "example" for response body

Open

#2387 aperta il 15 mar 2016

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)HTML (5474 fork)batch import
Enhancement: FeatureServer: Nodejshelp wanted

Metriche repository

Star
 (12.701 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Not sure if this is by design or bug. I have example for every object under definitions section. When I use codegen to generate a nodejs server, I am hoping at least the response body for GET should use the example data, but it doesn't.

Example data shows up under "Response Class", but when I click "Try it out!", in stead of example data, I get generic json object generated by Codegen using the schema. Like {"userName": "aeiou"}

Do I miss anything? Thanks

Guida contributor