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
… validate invocations
spacether
added a commit
that referenced
this pull request
Aug 16, 2023
* Adds lib for types * Fixes type errors in format.py * Adds query_params_suffix to fix type error * Fixes unset type * Fixes type errors in schema_configuration * Adds needed type info in validation.py * Fixes more type errors in validation.py * Adds U+T binding to fix type errors * Improves return type of _get_new_instance_without_conversion * Changes some typing.Type to type * Adds validate_base_ in Schema * Uses Schema.validate_base in api_client * Removes clashing validate overloads from schemas classes * Adds more missing types in schema.py * Adds needed type hint * Fixes some api_client types * Fixes type error in update_params_for_auth * Fixes type errors with vars write_file and new_file * FIxes type error with serialize methods for header classes * Fixes type error with None detection * Type error another none fix * Fixes type error by using literal for key_prefix in get_security_requirement_object * Fixes 2 type errors by using literals in get_server_url * Adds another validate_base signature to fix type errors in dictschema validate invocations * Improves type hints for DictSchema * Fixes type error with tuple detection * Fixes broken python tests by having composed dict schemas use the Schema base class * Eliminates incompatible sequence overloads * Fixes 1 type error * Fixes another type error * Fixes tuple type error * Fixes type error for path_to_schemas * Updates path_to_schemas to store one schema * Adds _instances type * Fixes more type errors * Fixes another type error * Removes unneeded overload * Detects and handles addProps=False and only one property * Removes one sequence usage in template * Removes another sequence usage * Relaces last sequence in templates * Fixes type errors by fixing get_security_requirement_object literal input * Adds exception raising for statuses in operation handling code, reduces type errors * Fixes assertion error, adds storage of error status codes for operation * Adds error status codes to python * Fixes operation return type * Fixes get_server_url invocation, adds literals * Renames all ApiResponse classes to ApiResponse, uses them in operation response * Fixes type of headers_schema * Removes dataclass from OpenApiResponse * Removes unneeded dataclasses from OpenApiResponse and classes it uses * Fixes skip_deserialization overload * Prevents parameter collisions * Adds array output class tuple generic type * Removes typeddict from responses * Adds missing elipses for tuple output type * Adds validate_base sequence back in * Removes getitem from list schemas * Removes typeddict from header classes * Changes order to int float * Do not generate validate with number schema + enum * Controls when composed schema validate methods are written, fixes type errors * Adds type(None) to types definition, fixes type errors * Turns off getitem, adds optional props * Writes property methods * Changes additional_properties to get_additional_property * Adds get_property method implementation * Changes template mode to get_property * Changes property to overloads * Has overloads use elipses * Handles the case where there is one required or optional property * Adds get_additional_property casting * Only cast individual property outputs * Ignores pyright reportWildcardImportFromLibrary * Fixes array self ref type hint * Makes T param bound to sequences, fixes type errors * Adds required and optional keys * Adds unset return for optional property values when there is only one property * Changes name variable to key * Removes unused templates * Adds required property returns in get_property * Fixes get_property implementation * Improves get_property implementation * Changes method name to get_additional_property_ * Adds @Property back * Convers ref properties back into getters * Converts get_property back into get_x methods * Fixes python tests * Adds unset returning in get_additional_property_ * Adds unset output for many cases * Adds unset types on all except for array and object models * Adds array unset return value * Adds unset types for optional map * Writes properties with unmodifed names, only writes them if they are valid * Fixes python tests * Adds mypy to petstore test * Fixes type error * FIxes last mypy errors * Adds py.typed, improves server imports * Adds __all__ definitions * Fixes unset type setting on optional returns * Fixes additiona prperties return type * Adds unset case for binary output * Fixes validate return types * Adds mapValueSchema * Refines types of SchemaDict values, supresses mypy response body type error * Adds get_response method in OpenApiResponse classes * Fixes java test * Samples regenerated * Fixes unit test sample, samples regenerated
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.
v3 adds mypy
literals which also match the additionalproperty str input, which causes a type error
PR 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.