Skip to content
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

Add response headers to response model #277

Closed
mohsen1 opened this issue Mar 5, 2015 · 8 comments
Closed

Add response headers to response model #277

mohsen1 opened this issue Mar 5, 2015 · 8 comments
Milestone

Comments

@mohsen1
Copy link
Contributor

mohsen1 commented Mar 5, 2015

Swagger UI needs response headers in response object model under headers property.

Related: swagger-api/swagger-ui#1000

@fehguy
Copy link
Contributor

fehguy commented Mar 6, 2015

you can get sample response headers from the petstore api now:

http://petstore.swagger.io/v2/swagger.json

@fehguy fehguy modified the milestone: v2.1-M2 Mar 7, 2015
@whitlockjc
Copy link
Contributor

I think he means the response object from SwaggerHttp.

@whitlockjc
Copy link
Contributor

@mohsen1 Can you tell me which fields you use in the response object? I see some duplication in what is there now and would like to know what you're using.

@fehguy
Copy link
Contributor

fehguy commented Mar 9, 2015

I thought i replied to this. There is a response header definition in the spec, which should be part of the "model" returned by each operation. That's different from what response headers actually come back from the server.

@whitlockjc
Copy link
Contributor

I was wrong. I misunderstood.

@whitlockjc
Copy link
Contributor

After being in the SwaggerHttp code recently and seeing now official response model structure, I thought that was the response he was referring to. But after looking at the code he pointed me to, I had just figured this out when you commented.

whitlockjc added a commit that referenced this issue Mar 11, 2015
@whitlockjc
Copy link
Contributor

This should be fixed.

@whitlockjc
Copy link
Contributor

The fix for this does not support references. References are broken in most of swagger-js and will be addressed together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants