Skip to content

Conversation

mike-oakley
Copy link

Inspired by upstream changes: openapi-generators/openapi-python-client#478

Adds a DataType enum. This:

Improves validation by rejecting invalid keywords which don't match the spec at parse-time.
Improves developer experience, allows IDE autocompletion to show allowed values.

@mike-oakley mike-oakley changed the title Add datatype enum. feat: Add datatype enum. May 13, 2022
@mike-oakley
Copy link
Author

Hey @kuimono any comments on this and #13?

@kuimono
Copy link
Owner

kuimono commented Jun 4, 2022

Adding the DataType enum could be a breaking change for users who are only using it as string.

Therefore this PR maybe pending for next major release.

@mike-oakley
Copy link
Author

I would argue that it will only be a breaking change if using it to parse schemas that are invalid from the OpenAPI spec 😉, but I guess you are technically right. Any idea when you'll release the next major? I was looking to get these changes in to allow this project to be a non-vendored dependency in the aforementioned downstream project 🤔.

@Goldziher
Copy link

@mike-oakley -> youre welcome to submit any and all improvements to https://github.com/starlite-api/pydantic-openapi-schema, we'll gladly release this PR (except for code duplication, which we should strive to reduce when possible).

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