Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

Drarok
Copy link

@Drarok Drarok commented Jun 14, 2019

Only include description in param and header when it has a value, else the resulting document fails validation

@coveralls
Copy link

coveralls commented Jun 14, 2019

Coverage Status

Coverage increased (+0.002%) to 96.83% when pulling a3c9114 on Drarok:fix/invalid-param-description into e911078 on noirbizarre:master.

@j5awry
Copy link
Collaborator

j5awry commented Jun 17, 2019

Can you provide the open issue this is in relation to? And/or recommended test cases?

Also, we'd greatly appreciate if unit tests could be added. If you're not sure where, we can help guide on that. Minimally we need steps to reproduce the error so we can test the fix.

@Drarok
Copy link
Author

Drarok commented Jun 17, 2019

There's no open issue at present, it's something I noticed was incorrect when trying to validate the swagger.json for our API.

I'll have a look at producing a test case, but unless there's already something validating against the Swagger schema, it might be a lot of work. I can assert that description isn't null (which is what the problem is) directly, but I don't know if that's official enough?

That said, I've found the contributing docs and they appear to be incorrect:

pip install -e .[dev]
zsh: no matches found: .[dev]

@Drarok
Copy link
Author

Drarok commented Jun 17, 2019

To put it briefly, the description key on a parameter must be a string, so null is invalid: https://swagger.io/specification/#parameterObject

I verified this using an online validator

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

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.