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

Response Content Type in Swagger #21

Closed
zuphilip opened this issue Nov 18, 2015 · 14 comments
Closed

Response Content Type in Swagger #21

zuphilip opened this issue Nov 18, 2015 · 14 comments

Comments

@zuphilip
Copy link
Member

Using a non-standard option in the response content type (e.g. + rdf+xml) does not affect the curl action shown below or the request headers.

@zuphilip zuphilip added the minor label Nov 18, 2015
@kba
Copy link
Contributor

kba commented Nov 18, 2015

Can you give an example? Apparently a problem like that just crashed the server, would like to reproduce.

@kba
Copy link
Contributor

kba commented Nov 18, 2015

The bug happens for text/n3, must investigate in infolis/mongoose-jsonld

@zuphilip
Copy link
Member Author

See #20 the example

@kba kba self-assigned this Nov 18, 2015
kba added a commit to kba/jsonld-rapper that referenced this issue Nov 19, 2015
@kba
Copy link
Contributor

kba commented Nov 19, 2015

There was some confusion of media types across the rdf processing libraries. Should be fixed now.

kba added a commit to infolis/mongoose-jsonld that referenced this issue Nov 19, 2015
@zuphilip
Copy link
Member Author

Yes, now it works to choose a non-standard option in the response content type withouth a crash and the response body will change accordingly.

The response headers and the options in the curl call are not yet fixed (see initial comment). Thus, I will leave that issue open but with low priority.

@kba
Copy link
Contributor

kba commented Nov 19, 2015

It's a bug in Swagger. Updated the library to the latet version and it's the same error. It doesn't work for the bundled HTML app either (try: http://infolis.gesis.org/infolink/vendor/swagger-ui/dist/index.html). Not much we can do short of digging into the Swagger JS (the Accept header is also wrong).

The important thing is that the requests are sent to the server correctly.

@kba
Copy link
Contributor

kba commented Nov 19, 2015

It doesn't work on the official demo site either: http://petstore.swagger.io/ with http://infolis.gesis.org/infolink/swagger.json

@zuphilip
Copy link
Member Author

It is confirmed that this is a swagger-ui bug and it was given the tag P2. I guess that means priority.

@kba
Copy link
Contributor

kba commented Nov 30, 2015

Seems fixed upstream by swagger-api/swagger-ui@8276fbf

@kba
Copy link
Contributor

kba commented Nov 30, 2015

Yes, swagger-api/swagger-ui#1767 (comment) is fixed and so is this.

@kba kba closed this as completed Nov 30, 2015
kba added a commit that referenced this issue Nov 30, 2015
@zuphilip
Copy link
Member Author

Yes, I see that the curl command is now fine. Shouldn't the request header change as well? Cf.

request-headers

@kba
Copy link
Contributor

kba commented Nov 30, 2015

Yes they should 😒

@zuphilip
Copy link
Member Author

Is that standard field in swagger-ui? I think I haven't seen this in the demo example from swagger-ui itself...

kba added a commit that referenced this issue Nov 30, 2015
@kba
Copy link
Contributor

kba commented Nov 30, 2015

Yes, it's a standard field, but it's disabled in the petstore demo. I disabled it here as well.

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

No branches or pull requests

2 participants