This repository was archived by the owner on Dec 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f183080
to
f5ccbe3
Compare
70676c0
to
d204f17
Compare
…es written for dict + tuple types
d204f17
to
ff52894
Compare
…ype + _helper_prefix_property_value_type
This was
linked to
issues
Jul 5, 2023
spacether
added a commit
that referenced
this pull request
Aug 16, 2023
* Schema mixnins and base classes removed, validate added, output classes written for dict + tuple types * Updates passed types in api_client and api_response * Does not run validation twice for unstances of ouput clas for object and array * Adds tests that verify that array and object validations are not run twice * Fixes schema ouput class instantiation to use super new * Renames two new templates to validate * Renames two last new templates to _helper_prefix_ref_property_value_type + _helper_prefix_property_value_type * Removes two unused templates * Adds new method to array output class * Adds new method to object output classes * Adds test_dict_validate_using_output_class * Adds test_list_validate_using_output_class * Replaces immutabledict.immutabledict with schemas.immutabledict * Removes unneeded init methods for dict output classes * Removes unneeded immutabledict imports * Fixes operation code samples in docs * Silences schema not found warnings * Adds requestBodySchemas to codegenOperation * Updates RequestBodySchemas jsonPathPiece names * Adds request body schema imports * Shortens request body schema imports in operation.py * Reverts content schema imports to be direct * Fixes response ApiRespinse body definition * Removes content and content type init imports * Fixes testResponseWithNoSchemaInHeaders * Fixes bug in detecting param required that broke two java tests * Samples regenerated * Fixes test of noncomplintdisc sample * Fixes some tests * Fixes path test validate typo * Allows int or float into int schemas because values like 1.0 need to be accepted * Adds Bool class and uses it during validation only * Fixes the last of the unit test sample tests * Samples updated * Fixes two python tests * Fixes last broken test in petstore
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
simplifes validation
__new__
method becomes thevalidate
methodSomeSchemaDict(...)
, not from the schema validation methodSomeSchema.validate(...)
Note
initially I defined Schema.output_type and output_types to define the output types that a schema generates
and I used that reference for property and
__getitem__
return types, but pycharm did not see through to the type defined in output_type/output_types. It described the type asoutput_type
So instead I fully inspect each schema and write its output types for properties +
__getitem__
return typesPR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/python*
.For Windows users, please run the script in Git BASH.