-
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
Response Messages's Response Model not shown #671
Comments
more info, please :) |
FYI, only the second option is valid:
|
But nothing is shown in marked area :( |
I didn't say it solves the issue, just wanted you to be aware the first option is a malformed Swagger spec. |
Thanks |
Hello, I have the same problem. Someone could solve it? |
Let's make sure it's the same issue. Can you share your own responses definition? |
The swagger version is 2.0.24. |
That's not a valid definition. "items" cannot contain multiple entries. Also, the definitions should have been something along the lines of: "definitions": {
"500": {
"type": "array",
"items": { ... }
}
}, |
I'm having the same problem as @sosoxuc "responses": {
"200": {
"description": "A-Ok",
"schema": {
"type": "string"
}
}
} It may look like the screenshot cut it off but I assure you it isn't there. |
I am also, I think, seeing this issue. The models that are This json was 'auto-created' by go-restful, FWIW. https://gist.github.com/gregzuro/519e97958d386b2f50c4 |
OK I've confirmed the case I was aware of is fixed in develop_2.0. Please reopen if you see issues after you test with 2.1.0-M1 |
I'm seeing this issue in 2.1.8-M1 |
I've been investigating the issue, and there is a "fork in the road", when it comes to the fix. We're dealing with the operation's responses: This means when we want a "rendered" JSON and Model view, when need to build it from the response object. To solve the above, we must either add more logic to the -UI regarding response objects. Such as "create an inline model instance" and "determine if its an object or primitive" The other alternative, is to process the response objects inside -JS, creating model instances where we need to. I don't know if anything(anyone) else depends on response objects schema's being plain objects. And whether they would be affected by this little refactor. In the end, it'll take maybe two hours to patch the code to work as everyone expects, but do we want to patch this or refactor it and simplify? @fehguy, @whitlockjc, @mohsen1 - thoughts? |
got the same problem over here! |
Hey @ponelat -- not sure if it helps your decision to generate within -ui or -js, ... but honestly, even something as simple as listing the name of the ResponseModel (without rendering it) would be a great first step. |
There is a meta-issue to support schemas differently and not render in the swagger-js client. I'm going to add tasks to that meta issue, reference this and other related issues, and close this out. |
Response Messages's Response Model not shown in case if primitive types e.g for string
The text was updated successfully, but these errors were encountered: