OPENi-ict / api-framework

0 stars 2 forks source link

Wrong request URLs #36

Closed nikosst closed 10 years ago

nikosst commented 10 years ago

The request urls in GET/POST are wrong, hostname is missing. For example: http://v.04/audio/

Thanks Nikos

mpetyx commented 10 years ago

I think this is probably been done by the mongrel2 configuration. @dmccarthy-tssg do you have any ideas on that?

For example, in http://193.1.188.34/api-docs/?api_framework=true#!/audio/Audio_post_1 the request is being sent on http://v.04/audio/ and not http://193.1.188.34/v.04/audio/

dmccarthy-dev commented 10 years ago

I was able to track the problem down to the /api/doc/schema/context/ endpoint. In the swagger definition there is a parameter with a dataType of "array" without the required items field. This is what is there. { "dataType": "array", "paramType": "query", "required": true, "name": "data", "description": "data value" }

and this is what should be there.

{ "dataType": "array", "paramType": "query", "required": true, "name": "data", "description": "data value", "items": { "$ref": "String" } }

I just updated the swagger-ui to the latest version to get the file upload working. It may be stricter about the swagger definition than the previous version.

nikosst commented 10 years ago

I did some tests (i'm not an expert in python though, so i may have missed something). It seems that the tastypie-swagger doesnt support that kind of swagger definition for array type. maybe because of the older swagger-spec version it supports.The addition of the "items field" doesn't get transferred to the produced json for context.