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

APIs.guru changed directory structure #26

Closed
IvanGoncharov opened this issue Nov 13, 2015 · 3 comments
Closed

APIs.guru changed directory structure #26

IvanGoncharov opened this issue Nov 13, 2015 · 3 comments

Comments

@IvanGoncharov
Copy link
Contributor

First of all thank you for using and promoting my project.
To fix APIs-guru/openapi-directory/issues/19 I changed directory structure, so instead of top level all specs moved into APIs folder.
I also switched from JSON to YAML.

It breaks your test suite and I see 3 possibilities to fix it:

  • Switch to using official REST API. It also support CORS so could be used directly for browser tests.
  • Use gh-pages branch which stay with the same directory structure and have JSON files.
  • Adjust to new directory structure and YAML

When you make your decision I can assist with migration.

P.S. I also create a badge to show number of APIs in collection: https://apis-guru.github.io/api-models/apis_in_collection_banner.svg
Maybe you can use it in your README or have an idea about text that better suite this badge.

@JamesMessinger
Copy link
Member

Hi. Sorry for not responding sooner. Been crazy busy!

Thank you for exposing your Swagger files via a REST API. That makes it SUPER easy for me to use them without having to create duplicate copies of them in this repo. I've made the necessary code changes on my end to use your API, and it mostly works great. But there are a couple APIs that don't pass validation, which is causing my test suites to fail. :( Any chance you could fix these validation issues?

backupify.com
The blob definition on line 1461 only has a description which isn't enough information to satisfy the oneOf rule in the Swagger 2.0 schema. Adding type: object solves the problem:

  blob:
    type: object
    description: A Binary Large OBject

plenigo.com
Basically the same issue as above. The OAuthError definition on line 1426 doesn't satisfy the oneOf rule in the Swagger 2.0 schema. Adding type: object solves the problem:

  OAuthError:
    type: object

watchful.li
Basically the same as above. The Uptime and Version definitions on lines 2444 - 2445 are missing type: object.

  Uptime:
    type: object
  Version:
    type: object

motaword.com
The POST /projects endpoint has file parameters. According to the Swagger 2.0 spec, if a parameter's type is "file", the consumes MUST be either "multipart/form-data", "application/x-www-form-urlencoded", or both. This can be fixed by adding the following at line 126:

    post:
      description: Create a new project
      operationId: createProject
      consumes:
        - multipart/form-data

uploady.com
Basically the same as above. The POST /upload endpoint has a file parameter, so it needs to consume "multipart/form-data". This can be fixed by adding the following at line 367:

    /upload:
      consumes:
        - multipart/form-data

@IvanGoncharov
Copy link
Contributor Author

@BigstickCarpet #28 Solves all issues except last two.
I will look into them tomorrow

@JamesMessinger
Copy link
Member

Ah shit. Didn't realize they had updated the schema. I really wish they would use semver, so npm would keep Swagger Parser up-to-date automatically. :(

Thanks for fixing that

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

2 participants