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 the suggestion exception raising when a MappedModel mappingName …
…is null
  • Loading branch information
spacether committed Apr 23, 2020
commit bc23d3e2b4a78c68b6a54a80b584cb79235663ba
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class CodegenDiscriminator {
// - 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
// - the name to schema map info in the discriminMappedModelator 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
Expand Down Expand Up @@ -108,6 +108,9 @@ public static class MappedModel implements Comparable<MappedModel>{
private String modelName;

public MappedModel(String mappingName, String modelName) {
if (mappingName == null) {
throw new RuntimeException("Discriminator mapping name cannot be null for model '" + modelName + "'");
}
this.mappingName = mappingName;
this.modelName = modelName;
}
Expand Down