Skip to content

Replaced 'TODO' hardcoded version info by a parameter with default '0… #6899

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

Merged
merged 2 commits into from
Sep 3, 2019

Conversation

ysavary
Copy link
Contributor

@ysavary ysavary commented Aug 29, 2019

Openapi SchemaGenerator was setting 'TODO' as version info. Replaced by a parameter with default value '0.1.0'

@carltongibson
Copy link
Collaborator

Okay, taking this on is good but why a hard coded value? In a way, I’d rather the TODO. (At least then I override get_schema to provide a sensible value...)

The init parameter is maybe right. That would need documentation.

@ysavary
Copy link
Contributor Author

ysavary commented Aug 30, 2019

Well, 'version' is mandatory in openapi specification. I have just chosen the 1st semantic minor version like other framework does: https://github.com/tiangolo/fastapi/blob/dcc1e1bcf823927817d8c133962bdb7a29e3d797/fastapi/applications.py#L32

- added version to high level API get_schema_view
- updated the documentation
Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this is a good win. Thanks @ysavary! 🎉

@carltongibson carltongibson merged commit e57c150 into encode:master Sep 3, 2019
@ysavary ysavary deleted the bugfix/openapi-info-version branch September 5, 2019 09:12
brianhelba added a commit to brianhelba/djangorestframework-stubs that referenced this pull request Dec 5, 2019
brianhelba added a commit to brianhelba/djangorestframework-stubs that referenced this pull request Dec 6, 2019
mkurnikov pushed a commit to typeddjango/djangorestframework-stubs that referenced this pull request Dec 7, 2019
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants