This repository has been archived by the owner on Dec 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
v3 convert nested schemas into sequential schemas #177
Merged
Conversation
This file contains 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
spacether
force-pushed
the
v3_removes_nested_schemas
branch
2 times, most recently
from
May 31, 2023 13:52
effb5f6
to
0c98150
Compare
spacether
force-pushed
the
v3_removes_nested_schemas
branch
from
May 31, 2023 14:53
0c98150
to
72ab53e
Compare
spacether
changed the title
v3 removes nested schemas
v3 convert nested schemas into sequential schemas
May 31, 2023
…nged to validate_pattern
…les in properties
spacether
added a commit
that referenced
this pull request
Jun 8, 2023
* Writes nested schemas earlier and uses them later * Refactors order CodegenSchema properties are set in to match the order in getSchemas * Adjusts ref input to setSchemaLocationInfo * Tweak improves schema template * Adds properties classes * Replaces properties with field * Uses Schema_() * Uses dataclass properties * Adds missing type info * Updates all_of * Adds any_of, all_of tuples * Fixes types definition * Fixed test_any_type_schema tests * Fixes dataclass type setting issues * Fixes simple schema format type * Adds and uses PatternInfo for pattern schema info, validate_regex changed to validate_pattern * Fixes not constraint tests * Adds tuple_to_instance * Writes out allOf/anyOf/oneOf types * Updates classproperty decorator * Adds enum return types * Fixes type errors in schemas.py * Adds schema singleton metaclass * Replaces CodegenServer variables with object schema containing variables in properties * Generates server variables as an object schema to keep all schemas at the root depth * Fixes new signatures in servers schemas * Simplifies Server variables definition * Uses schema default for server variables * Adds required vars in server definition * Fixes classproperty and SchemaBase classes * Fixes broken configuration tests * Fixes server docs * Adds isInlineDefinition * Adds allOf/anyOf/oneOf/properties jsonPathPiece * Uses jsonPathPiece in properties/allOf/anyOf/oneOf * Fixes properties typeddict name * Templates updated to write allOf/anyOf/oneOf/properties earlier if possible * generates properties/allOf/anyOf/oneOf before class if possible * Adds and uses schemas.INPUT_TYPES_ALL_INCL_SCHEMA * Adds another usage of schemas.INPUT_TYPES_ALL_INCL_SCHEMA * Changes SchemaBase to SingletonMeta * Only calculates allSchemas once * Reduces iteration through allSchemas from 2x to 1x * Removes some getKey invocations * Consolidates more getKey usages * Deletes getKey with one input * Adds comment * Updates the definition of required properties, reduces the number of calls to getKey * Updates getKey to use sourceJsonPath * Adds class name generation that includes numbered suffixes when needed * Uses pre order traversal for naming schema classes * Fixes oneOf/anyOf/allOf type aliases * Adds and uses schemas.INPUT_BASE_TYPES * Adds string representation of CodegenKey * Fixes java tests * Samples regenerated * Samples regenerated
spacether
added a commit
that referenced
this pull request
Aug 16, 2023
* Writes nested schemas earlier and uses them later * Refactors order CodegenSchema properties are set in to match the order in getSchemas * Adjusts ref input to setSchemaLocationInfo * Tweak improves schema template * Adds properties classes * Replaces properties with field * Uses Schema_() * Uses dataclass properties * Adds missing type info * Updates all_of * Adds any_of, all_of tuples * Fixes types definition * Fixed test_any_type_schema tests * Fixes dataclass type setting issues * Fixes simple schema format type * Adds and uses PatternInfo for pattern schema info, validate_regex changed to validate_pattern * Fixes not constraint tests * Adds tuple_to_instance * Writes out allOf/anyOf/oneOf types * Updates classproperty decorator * Adds enum return types * Fixes type errors in schemas.py * Adds schema singleton metaclass * Replaces CodegenServer variables with object schema containing variables in properties * Generates server variables as an object schema to keep all schemas at the root depth * Fixes new signatures in servers schemas * Simplifies Server variables definition * Uses schema default for server variables * Adds required vars in server definition * Fixes classproperty and SchemaBase classes * Fixes broken configuration tests * Fixes server docs * Adds isInlineDefinition * Adds allOf/anyOf/oneOf/properties jsonPathPiece * Uses jsonPathPiece in properties/allOf/anyOf/oneOf * Fixes properties typeddict name * Templates updated to write allOf/anyOf/oneOf/properties earlier if possible * generates properties/allOf/anyOf/oneOf before class if possible * Adds and uses schemas.INPUT_TYPES_ALL_INCL_SCHEMA * Adds another usage of schemas.INPUT_TYPES_ALL_INCL_SCHEMA * Changes SchemaBase to SingletonMeta * Only calculates allSchemas once * Reduces iteration through allSchemas from 2x to 1x * Removes some getKey invocations * Consolidates more getKey usages * Deletes getKey with one input * Adds comment * Updates the definition of required properties, reduces the number of calls to getKey * Updates getKey to use sourceJsonPath * Adds class name generation that includes numbered suffixes when needed * Uses pre order traversal for naming schema classes * Fixes oneOf/anyOf/allOf type aliases * Adds and uses schemas.INPUT_BASE_TYPES * Adds string representation of CodegenKey * Fixes java tests * Samples regenerated * 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 convert nested schemas into sequential schemas
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.