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

Swagger compliance #62

Open
jonasrichard opened this issue May 3, 2016 · 2 comments
Open

Swagger compliance #62

jonasrichard opened this issue May 3, 2016 · 2 comments

Comments

@jonasrichard
Copy link

I ran some compliance issues which can be fixed in the examples section (how to use cowboy-swagger), or in the code itself (what cowboy-swagger generates).

  • in the info object version of the api is required (there should be some generated version in default)
  • swagger editor [1] also complained about the missing basePath. Even when I specified basePath in the app.config I didn't see in the json, probably it didn't pick up the value.
  • a path parameter needs a type field (it seems to be required), it can be string or number see spec [2]. format which is optional but in numeric cases would be good to see an example.
  • when responses are needed, it needs at least:
"responses": {
    "default": {
        "description": ""
    }
}

but one can specify schema per http response code. See links below [2].

  • For body parameters I needed to define a "schema": {} at least, in order that the JSON would be compliant. required is not required here, type is forbidden.

I didn't have time to discover all parts of schema, but it would be a good example how to define request bodies which conform to a json.

[1] http://editor.swagger.io/#/
[2] http://swagger.io/specification/

@philipcristiano
Copy link

I also ran into the missing version issue after following the examples.

@paulo-ferraz-oliveira paulo-ferraz-oliveira self-assigned this Oct 28, 2020
@paulo-ferraz-oliveira
Copy link
Collaborator

I'm tentatively assigning this to me. Can't guarantee I'll have the time to look at it, but it'll stay in my TO DO list, at least 😄

@paulo-ferraz-oliveira paulo-ferraz-oliveira removed their assignment Mar 11, 2023
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