Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adds description of how mappedModels is populated
  • Loading branch information
spacether committed Apr 23, 2020
commit 607f638301fec5019b64e38d2e2faab46cdf75e6
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ public class CodegenDiscriminator {
private String propertyGetter;
private String propertyType;
private Map<String, String> mapping;

// mappedModels is populated differently if discriminatorExplicitMappingVerbose is
// True or False. When:
//
// discriminatorExplicitMappingVerbose == False, this contains:
// - the name to schema map info in the discriminator mapping entry in your openapi spec OR
// - child schemas that allOf inherit self schema
//
// discriminatorExplicitMappingVerbose == True, this contains:
// - the name to schema map info in the discriminator mapping entry in your openapi spec AND
// - x-discriminator-value mappings in child oneOf + anyOf schemas + descendant schemas that allOf inherit self schema AND
// - descendant schemas that allOf inherit self schema AND
// - child oneOf + anyOf schemas
//
// see the method createDiscriminator in DefaultCodegen.java

private Set<MappedModel> mappedModels = new LinkedHashSet<>();

public String getPropertyName() {
Expand Down