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.
Type of change
Objective
The
quicktype
schema generation seems to have trouble with types in schema files being referenced from other types in separate schema files, which created duplicate classes, with a lot of strange names.Instead of generating one individual file for each response, we create a big struct with all the options. This seems to solve the issue of references between schema files, and so no duplicate classes are created.
Note that the way that the file is loaded in
quicktype
is different. By default,quicktype
generates JSON conversion helper functions only for the root type, which would be the big structSchemaTypes
. By importing the file with#/definitions/
appended, we only bring the sub schemas as root types, and ignoreSchemaTypes
, which we don't care about.Examples of the schema changes, using C# as an example:
ProjectsResponse
previously contained an array ofDatumElement
, which were identical toProjectResponse
. Now it properly contains an array ofProjectResponse
. This is also applicable toSecretsResponse
which contained an array ofDatumClass
Argon2ID
, named:FluffyArgon2Id
andPurpleArgon2Id
, now there is only oneArgon2Id
. This is applicable to the two factor response types, which change in the same wayThis is working correctly with the Java, Go, C++, PHP and Ruby bindings.