-
Notifications
You must be signed in to change notification settings - Fork 8.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
Support for Example Object #618
Comments
+1 |
Can we have a third tab after "Model" and "Model schema"? "Model Example"? |
it seems to me that the "model schema" should go away, because people will care more about either the example value, or the human description of it. Thoughts? |
I can see that - but you don't want to lose the functionality of filling the box with a possible value. Though now we need also to support the XML stuff. |
yea, but wouldn't that example be best for populating the sample value? With XML of course, if they've switched to xml |
"example" isn't mandatory. |
Yes, but we'll generate it based on the schema, for json or xml, no? |
I'm not sure we're talking about the same thing. Right now, under the "model schema" display there's a "click to set as a parameter value" text. If you remove the model schema, there's nothing to click to set as value to the parameter. |
examples are now put in the model definitions. |
I am still not able to see the "examples" object in Swagger -Local editor (Local Instance). But the same is working fine in Swagger Online Editor. Please advice my Yaml Code ---
info:
title: "IPS API"
version: "1.0.0"
description: "API for Investment Product Services "
license:
name: "IPS"
contact: {}
paths:
/strategies:
get:
responses:
200:
description: "Success"
schema:
items:
$ref: "#/definitions/strategies"
type: "array"
examples:
application/json:
-
url: "http://yaml-online-parser.appspot.com/"
name: "Yahoo"
-
url: "http://yaml-online-parser.appspot.com/"
name: "Yahoo" |
@muralilaxman you're looking for swagger-editor, and if you're running locally version 0.7.5, then you're using a very old one. Try updating to the latest. |
@webron - I installed the latest swagger editor (2.9.8) locally and ran the above YAML script . But still the exampes model is not showing up.. I followed the steps mentioned in this link to install the Swagger-Editor locally. |
Then you should open a ticket on that project. |
It seems like the example object is not shown in the UI. Here is a sample JSON file with example object:
https://github.com/wordnik/swagger-spec/blob/master/fixtures/v2.0/json/resources/resourceWithExamplePayload.json
When will this be added?
Thanks,
Edmond
The text was updated successfully, but these errors were encountered: