APIs-guru / openapi-directory

🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
https://apis.guru/
Creative Commons Zero v1.0 Universal
3.83k stars 575 forks source link

Add "OrderCloud.io" API #117

Closed eerickson451 closed 6 years ago

eerickson451 commented 7 years ago

Format: OpenAPI(fka Swagger) 2.0 Official: YES Url: https://raw.githubusercontent.com/ordercloud-api/swagger/master/ordercloud_swagger.json Name: OrderCloud.io

IvanGoncharov commented 7 years ago

@eerickson451 Thank you for submission. I found few errors in your spec, see here: http://editor.swagger.io/#/?import=https://raw.githubusercontent.com/ordercloud-api/swagger/master/ordercloud_swagger.json This tool is laggy so you need to wait for a couple of seconds.

Can you please fix them? The most frequent issue, is very simple and caused by parameters like that:

          {
            "name": "filters",
            "in": "query",
            "description": "Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'",
            "required": false,
            "type": "object"
          }

Problem is that OpenAPI doesn't support object as type for query parameters:

Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of "string", "number", "integer", "boolean", "array" or "file".

For more details see this: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#user-content-parameterType

You can fix this by simply replacing object with string, it correct solution since any query parameter can be passed as a string.

MikeRalphson commented 7 years ago

Ping @eerickson451 are you still working on resolving the errors in this definition?

tmenier commented 7 years ago

@MikeRalphson eerickson451 is no longer responsible for this but we're transitioning it to someone else to look into soon. Hope you don't mind leaving this open a bit longer. Thanks!

MikeRalphson commented 6 years ago

Closing due to inactivity - but please feel free to reopen the issue if necessary.