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

Set the proper JSON schema type for HStoreFields in OpenAPI schemas #6914

Merged
merged 1 commit into from Oct 28, 2019
Merged

Set the proper JSON schema type for HStoreFields in OpenAPI schemas #6914

merged 1 commit into from Oct 28, 2019

Conversation

Lucidiot
Copy link
Contributor

@Lucidiot Lucidiot commented Sep 5, 2019

Note: Before submitting this pull request, please review our contributing guidelines.

Description

HStoreFields were described as {"type": "string"} inside OpenAPI schemas, while they should actually be {"type": "object"}, because the generator did not recognize them. This PR fixes this issue and adds a test case for this particular field.

Fixes #6913

La0
La0 approved these changes Sep 10, 2019
Copy link
Member

@kevin-brown kevin-brown left a comment

My first thought was "this makes sense, it's a DictField so it should be just using that" and then I remembered that we map to the exact type.

So this looks good to me and makes sense.

@Lucidiot
Copy link
Contributor Author

Lucidiot commented Oct 25, 2019

@carltongibson Do you have the time to review and click the big green button?

@kevin-brown kevin-brown merged commit 39bd6cc into encode:master Oct 28, 2019
1 check passed
@kevin-brown kevin-brown added this to the 3.10.3 Release milestone Oct 28, 2019
@Lucidiot Lucidiot deleted the openapi-hstorefield branch Oct 30, 2019
@kevin-brown kevin-brown modified the milestones: 3.10.3 Release, 3.10.4 Release Nov 11, 2019
@rpkilby rpkilby modified the milestones: 3.10.4 Release, 3.11 Release Dec 6, 2019
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
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.

Schema generation with an HStoreField gives an incorrect type
4 participants