Closes #23 Use title to create inner schema names #24
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.
@davidmigloz the default schema naming has been reconsidered and the
title
property is now honored. Although, there are still checks to ensure that the schema name is unique, if it is not (due to spec duplication or user error) the generator will fallback to the longer unique name. Else you will get some very cryptic code generation errors that may be hard to trace due to the name conflicts.Ultimately, these latest changes result in the following client code. I believe this is a lot closer to what you envisioned initially. See a few of the permutations below. I agree, this is much more developer friendly compared to the default logic (when no custom
title
is provided) seen in #21EDIT: Example below also showcases deserialization logic for primitive unions added in #29
YAML
Having said that, for the
CreateCompletionRequest
example we have been using, a few small mods to the spectitle
property of the parameters:Dart