diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/GenOpenApi3.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/GenOpenApi3.java index 6a304c42..3c933c4b 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/GenOpenApi3.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/GenOpenApi3.java @@ -13,16 +13,16 @@ import com.reprezen.jsonoverlay.gen.CodeGenerator; public class GenOpenApi3 { - public static void main(String[] args) throws Exception { - CodeGenerator.main(new String[] { // - "-t", "src/main/java/com/reprezen/kaizen/oasparser/types3.yaml", // - "-p", "com.reprezen.kaizen.oasparser", // - "-d", "src/main/java/com/reprezen/kaizen/oasparser", // - "-i", "model3", // - "-I", "model3", // - "-c", "ovl3", // - "-C", "ovl3", // - // , "-n" // uncomment to run in no-preserve mode - }); - } + public static void main(String[] args) throws Exception { + CodeGenerator.main(new String[] { // + "-t", "src/main/java/com/reprezen/kaizen/oasparser/types3.yaml", // + "-p", "com.reprezen.kaizen.oasparser", // + "-d", "src/main/java/com/reprezen/kaizen/oasparser", // + "-i", "model3", // + "-I", "model3", // + "-c", "ovl3", // + "-C", "ovl3", // + // , "-n" // uncomment to run in no-preserve mode + }); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApi3Parser.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApi3Parser.java index bd09ea36..d5d5f827 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApi3Parser.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApi3Parser.java @@ -20,67 +20,68 @@ public class OpenApi3Parser extends OpenApiParser { - public OpenApi3Parser() { - super(); - } - - public OpenApi3Parser(ValidationConfigurator validationConfigurator) { - super(validationConfigurator); - } - - @Override - public OpenApi3 parse(String spec, URL resolutionBase) { - return (OpenApi3) super.parse(spec, resolutionBase); - } - - @Override - public OpenApi3 parse(String spec, URL resolutionBase, boolean validate) { - return (OpenApi3) super.parse(spec, resolutionBase, validate); - } - - @Override - public OpenApi3 parse(File specFile) throws Exception { - return (OpenApi3) super.parse(specFile); - } - - @Override - public OpenApi3 parse(File specFile, boolean validate) throws Exception { - return (OpenApi3) super.parse(specFile, validate); - } - - @Override - public OpenApi3 parse(URI uri) throws Exception { - return (OpenApi3) super.parse(uri); - } - - @Override - public OpenApi3 parse(URI uri, boolean validate) throws Exception { - return (OpenApi3) super.parse(uri, validate); - } - - @Override - public OpenApi3 parse(URL resolutionBase) throws Exception { - return (OpenApi3) super.parse(resolutionBase); - } - - @Override - public OpenApi3 parse(URL resolutionBase, boolean validate) throws Exception { - return (OpenApi3) super.parse(resolutionBase, validate); - } - - @Override - public OpenApi3 parse(JsonNode tree, URL resolutionBase) { - return (OpenApi3) super.parse(tree, resolutionBase); - } - - @Override - public OpenApi3 parse(JsonNode tree, URL resolutionBase, boolean validate) { - return (OpenApi3) super.parse(tree, resolutionBase, validate); - } - - @Override - protected boolean isVersion3(JsonNode tree) { - return true; // if 'openapi' property is missing or incorrect, that will show up as a - // validation error - } + public OpenApi3Parser() { + super(); + } + + public OpenApi3Parser(ValidationConfigurator validationConfigurator) { + super(validationConfigurator); + } + + @Override + public OpenApi3 parse(String spec, URL resolutionBase) { + return (OpenApi3) super.parse(spec, resolutionBase); + } + + @Override + public OpenApi3 parse(String spec, URL resolutionBase, boolean validate) { + return (OpenApi3) super.parse(spec, resolutionBase, validate); + } + + @Override + public OpenApi3 parse(File specFile) throws Exception { + return (OpenApi3) super.parse(specFile); + } + + @Override + public OpenApi3 parse(File specFile, boolean validate) throws Exception { + return (OpenApi3) super.parse(specFile, validate); + } + + @Override + public OpenApi3 parse(URI uri) throws Exception { + return (OpenApi3) super.parse(uri); + } + + @Override + public OpenApi3 parse(URI uri, boolean validate) throws Exception { + return (OpenApi3) super.parse(uri, validate); + } + + @Override + public OpenApi3 parse(URL resolutionBase) throws Exception { + return (OpenApi3) super.parse(resolutionBase); + } + + @Override + public OpenApi3 parse(URL resolutionBase, boolean validate) throws Exception { + return (OpenApi3) super.parse(resolutionBase, validate); + } + + @Override + public OpenApi3 parse(JsonNode tree, URL resolutionBase) { + return (OpenApi3) super.parse(tree, resolutionBase); + } + + @Override + public OpenApi3 parse(JsonNode tree, URL resolutionBase, boolean validate) { + return (OpenApi3) super.parse(tree, resolutionBase, validate); + } + + @Override + protected boolean isVersion3(JsonNode tree) { + return true; // if 'openapi' property is missing or incorrect, that will + // show up as a + // validation error + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApiParser.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApiParser.java index 0568c353..acd0cd72 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApiParser.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/OpenApiParser.java @@ -28,121 +28,121 @@ public class OpenApiParser { - private Injector injector; + private Injector injector; - public OpenApiParser() { - this(new OverlayValidationConfigurator()); - } + public OpenApiParser() { + this(new OverlayValidationConfigurator()); + } - public OpenApiParser(ValidationConfigurator validationConfigurator) { - this.injector = Guice.createInjector(validationConfigurator); - } + public OpenApiParser(ValidationConfigurator validationConfigurator) { + this.injector = Guice.createInjector(validationConfigurator); + } - public OpenApi parse(String spec, URL resolutionBase) { - return parse(spec, resolutionBase, true); - } + public OpenApi parse(String spec, URL resolutionBase) { + return parse(spec, resolutionBase, true); + } - public OpenApi parse(String spec, URL resolutionBase, boolean validate) { - try { - JsonNode tree = new JsonLoader().loadString(resolutionBase, spec); - return parse(tree, resolutionBase, validate); + public OpenApi parse(String spec, URL resolutionBase, boolean validate) { + try { + JsonNode tree = new JsonLoader().loadString(resolutionBase, spec); + return parse(tree, resolutionBase, validate); - } catch (IOException e) { - throw new OpenApiParserException("Failed to parse spec as JSON or YAML", e); - } + } catch (IOException e) { + throw new OpenApiParserException("Failed to parse spec as JSON or YAML", e); } + } - public OpenApi parse(File specFile) throws Exception { - return parse(specFile, true); - } + public OpenApi parse(File specFile) throws Exception { + return parse(specFile, true); + } - public OpenApi parse(File specFile, boolean validate) throws Exception { - try { - return parse(specFile.toURI().toURL(), validate); - } catch (IOException e) { - throw new OpenApiParserException("Failed to read spec from file", e); - } + public OpenApi parse(File specFile, boolean validate) throws Exception { + try { + return parse(specFile.toURI().toURL(), validate); + } catch (IOException e) { + throw new OpenApiParserException("Failed to read spec from file", e); } + } - public OpenApi parse(URI uri) throws Exception { - return parse(uri, true); - } + public OpenApi parse(URI uri) throws Exception { + return parse(uri, true); + } - public OpenApi parse(URI uri, boolean validate) throws Exception { - try { - return parse(uri.toURL(), validate); - } catch (MalformedURLException e) { - throw new OpenApiParserException("Invalid URI for Swagger spec", e); + public OpenApi parse(URI uri, boolean validate) throws Exception { + try { + return parse(uri.toURL(), validate); + } catch (MalformedURLException e) { + throw new OpenApiParserException("Invalid URI for Swagger spec", e); + } + } + + public OpenApi parse(URL resolutionBase) throws Exception { + return parse(resolutionBase, true); + } + + public OpenApi parse(URL resolutionBase, boolean validate) throws Exception { + ReferenceManager manager = new ReferenceManager(resolutionBase); + return parse(manager, validate); + } + + public OpenApi parse(JsonNode tree, URL resolutionBase) { + return parse(tree, resolutionBase, true); + } + + public OpenApi parse(JsonNode tree, URL resolutionBase, boolean validate) { + ReferenceManager manager = new ReferenceManager(resolutionBase, tree); + return parse(manager, validate); + } + + private OpenApi parse(ReferenceManager manager, boolean validate) { + JsonNode tree; + try { + tree = manager.loadDoc(); + if (isVersion3(tree)) { + OpenApi3 model = (OpenApi3) OpenApi3Impl.factory.create(tree, null, manager); + ((OpenApi3Impl) model)._setCreatingRef(manager.getDocReference()); + injector.injectMembers(model); + if (validate) { + model.validate(); } + return model; + } else { + throw new OpenApiParserException( + "Could not determine OpenApi version from model: no 'openapi' property"); + } + } catch (IOException e) { + throw new OpenApiParserException("Failed to parse model", e); } + } - public OpenApi parse(URL resolutionBase) throws Exception { - return parse(resolutionBase, true); - } + protected boolean isVersion3(JsonNode tree) { + JsonNode versionNode = tree.path("openapi"); + return versionNode.isTextual() && versionNode.asText().startsWith("3."); + } - public OpenApi parse(URL resolutionBase, boolean validate) throws Exception { - ReferenceManager manager = new ReferenceManager(resolutionBase); - return parse(manager, validate); - } + public static class OpenApiParserException extends RuntimeException { - public OpenApi parse(JsonNode tree, URL resolutionBase) { - return parse(tree, resolutionBase, true); - } + private static final long serialVersionUID = 1L; - public OpenApi parse(JsonNode tree, URL resolutionBase, boolean validate) { - ReferenceManager manager = new ReferenceManager(resolutionBase, tree); - return parse(manager, validate); + public OpenApiParserException() { + super(); } - private OpenApi parse(ReferenceManager manager, boolean validate) { - JsonNode tree; - try { - tree = manager.loadDoc(); - if (isVersion3(tree)) { - OpenApi3 model = (OpenApi3) OpenApi3Impl.factory.create(tree, null, manager); - ((OpenApi3Impl) model)._setCreatingRef(manager.getDocReference()); - injector.injectMembers(model); - if (validate) { - model.validate(); - } - return model; - } else { - throw new OpenApiParserException( - "Could not determine OpenApi version from model: no 'openapi' property"); - } - } catch (IOException e) { - throw new OpenApiParserException("Failed to parse model", e); - } + public OpenApiParserException(String message, Throwable cause, boolean enableSuppression, + boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); } - protected boolean isVersion3(JsonNode tree) { - JsonNode versionNode = tree.path("openapi"); - return versionNode.isTextual() && versionNode.asText().startsWith("3."); + public OpenApiParserException(String message, Throwable cause) { + super(message, cause); } - public static class OpenApiParserException extends RuntimeException { - - private static final long serialVersionUID = 1L; - - public OpenApiParserException() { - super(); - } - - public OpenApiParserException(String message, Throwable cause, boolean enableSuppression, - boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } - - public OpenApiParserException(String message, Throwable cause) { - super(message, cause); - } - - public OpenApiParserException(String message) { - super(message); - } + public OpenApiParserException(String message) { + super(message); + } - public OpenApiParserException(Throwable cause) { - super(cause); - } + public OpenApiParserException(Throwable cause) { + super(cause); } + } } \ No newline at end of file diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Callback.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Callback.java index a819c2c0..02a124f2 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Callback.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Callback.java @@ -9,55 +9,55 @@ public interface Callback extends IJsonOverlay, IModelPart { - String getName(); + String getName(); - // CallbackPath - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbackPaths(); + // CallbackPath + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbackPaths(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbackPaths(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbackPaths(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallbackPaths(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallbackPaths(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallbackPath(String expression); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallbackPath(String expression); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Path getCallbackPath(String expression); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Path getCallbackPath(String expression); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallbackPaths(Map callbackPaths); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallbackPaths(Map callbackPaths); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallbackPath(String expression, Path callbackPath); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallbackPath(String expression, Path callbackPath); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeCallbackPath(String expression); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeCallbackPath(String expression); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Contact.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Contact.java index a6e769a8..4f6cedf4 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Contact.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Contact.java @@ -9,49 +9,49 @@ public interface Contact extends IJsonOverlay, IModelPart { - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // Url - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getUrl(); + // Url + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setUrl(String url); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setUrl(String url); - // Email - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getEmail(); + // Email + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getEmail(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEmail(String email); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEmail(String email); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/EncodingProperty.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/EncodingProperty.java index 4dc88307..defc35f3 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/EncodingProperty.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/EncodingProperty.java @@ -9,77 +9,77 @@ public interface EncodingProperty extends IJsonOverlay, IModelPart { - // ContentType - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getContentType(); + // ContentType + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getContentType(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentType(String contentType); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentType(String contentType); - // Header - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(); + // Header + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeaders(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeaders(Map headers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeaders(Map headers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeader(String name, String header); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeader(String name, String header); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeHeader(String name); - // Style - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getStyle(); + // Style + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getStyle(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setStyle(String style); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setStyle(String style); - // Explode - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getExplode(); + // Explode + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getExplode(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isExplode(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isExplode(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExplode(Boolean explode); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExplode(Boolean explode); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Example.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Example.java index 9018e6a5..44022677 100644 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Example.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Example.java @@ -9,58 +9,58 @@ public interface Example extends IJsonOverlay, IModelPart { - String getName(); + String getName(); - // Summary - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getSummary(); + // Summary + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getSummary(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSummary(String summary); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSummary(String summary); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Value - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getValue(); + // Value + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getValue(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setValue(Object value); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setValue(Object value); - // ExternalValue - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getExternalValue(); + // ExternalValue + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getExternalValue(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExternalValue(String externalValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExternalValue(String externalValue); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ExternalDocs.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ExternalDocs.java index ebd41467..d5987cb6 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ExternalDocs.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ExternalDocs.java @@ -9,42 +9,42 @@ public interface ExternalDocs extends IJsonOverlay, IModelPart { - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Url - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getUrl(); + // Url + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setUrl(String url); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setUrl(String url); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Header.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Header.java index 47c9e9e4..7d3f3b99 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Header.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Header.java @@ -9,175 +9,175 @@ public interface Header extends IJsonOverlay
, IModelPart { - String getKey(); + String getKey(); - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // In - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getIn(); + // In + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getIn(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setIn(String in); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setIn(String in); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Required - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getRequired(); + // Required + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getRequired(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isRequired(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isRequired(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequired(Boolean required); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequired(Boolean required); - // Deprecated - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getDeprecated(); + // Deprecated + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isDeprecated(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDeprecated(Boolean deprecated); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDeprecated(Boolean deprecated); - // AllowEmptyValue - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getAllowEmptyValue(); + // AllowEmptyValue + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getAllowEmptyValue(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isAllowEmptyValue(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isAllowEmptyValue(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAllowEmptyValue(Boolean allowEmptyValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAllowEmptyValue(Boolean allowEmptyValue); - // Style - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getStyle(); + // Style + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getStyle(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setStyle(String style); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setStyle(String style); - // Explode - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getExplode(); + // Explode + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getExplode(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isExplode(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isExplode(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExplode(Boolean explode); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExplode(Boolean explode); - // AllowReserved - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getAllowReserved(); + // AllowReserved + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getAllowReserved(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isAllowReserved(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isAllowReserved(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAllowReserved(Boolean allowReserved); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAllowReserved(Boolean allowReserved); - // Schema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(); + // Schema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSchema(Schema schema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSchema(Schema schema); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExample(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExample(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(Object example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(Object example); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExamples(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Example getExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Example getExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExamples(Map examples); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExamples(Map examples); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(String name, Example example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(String name, Example example); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExample(String name); - // ContentMediaType - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(); + // ContentMediaType + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaTypes(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - MediaType getContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + MediaType getContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaTypes(Map contentMediaTypes); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaTypes(Map contentMediaTypes); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaType(String name, MediaType contentMediaType); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaType(String name, MediaType contentMediaType); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeContentMediaType(String name); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Info.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Info.java index 6b4c28a2..1d717fe1 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Info.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Info.java @@ -9,76 +9,76 @@ public interface Info extends IJsonOverlay, IModelPart { - // Title - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getTitle(); + // Title + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getTitle(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTitle(String title); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTitle(String title); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // TermsOfService - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getTermsOfService(); + // TermsOfService + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getTermsOfService(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTermsOfService(String termsOfService); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTermsOfService(String termsOfService); - // Contact - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Contact getContact(); + // Contact + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Contact getContact(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Contact getContact(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Contact getContact(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContact(Contact contact); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContact(Contact contact); - // License - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - License getLicense(); + // License + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + License getLicense(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - License getLicense(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + License getLicense(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setLicense(License license); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setLicense(License license); - // Version - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getVersion(); + // Version + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getVersion(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setVersion(String version); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setVersion(String version); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/License.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/License.java index f680bc91..0d19ab9c 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/License.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/License.java @@ -9,42 +9,42 @@ public interface License extends IJsonOverlay, IModelPart { - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // Url - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getUrl(); + // Url + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setUrl(String url); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setUrl(String url); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Link.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Link.java index 6a590914..fb501f81 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Link.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Link.java @@ -9,111 +9,111 @@ public interface Link extends IJsonOverlay, IModelPart { - String getName(); + String getName(); - // OperationId - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getOperationId(); + // OperationId + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getOperationId(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOperationId(String operationId); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOperationId(String operationId); - // OperationRef - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getOperationRef(); + // OperationRef + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getOperationRef(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOperationRef(String operationRef); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOperationRef(String operationRef); - // Parameter - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getParameters(); + // Parameter + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getParameters(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getParameters(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameters(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameter(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameter(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getParameter(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getParameter(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameters(Map parameters); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameters(Map parameters); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameter(String name, String parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameter(String name, String parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeParameter(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeParameter(String name); - // Header - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(); + // Header + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeaders(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Header getHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Header getHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeaders(Map headers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeaders(Map headers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeader(String name, Header header); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeader(String name, Header header); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeHeader(String name); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Server - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Server getServer(); + // Server + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Server getServer(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Server getServer(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Server getServer(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServer(Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServer(Server server); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/MediaType.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/MediaType.java index dd15681e..930a39ce 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/MediaType.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/MediaType.java @@ -9,95 +9,95 @@ public interface MediaType extends IJsonOverlay, IModelPart { - // Schema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(); + // Schema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSchema(Schema schema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSchema(Schema schema); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExamples(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Example getExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Example getExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExamples(Map examples); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExamples(Map examples); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(String name, Example example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(String name, Example example); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExample(String name); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExample(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExample(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(Object example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(Object example); - // EncodingProperty - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getEncodingProperties(); + // EncodingProperty + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getEncodingProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getEncodingProperties(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getEncodingProperties(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasEncodingProperties(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasEncodingProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasEncodingProperty(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasEncodingProperty(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - EncodingProperty getEncodingProperty(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + EncodingProperty getEncodingProperty(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEncodingProperties(Map encodingProperties); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEncodingProperties(Map encodingProperties); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEncodingProperty(String name, EncodingProperty encodingProperty); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEncodingProperty(String name, EncodingProperty encodingProperty); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeEncodingProperty(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeEncodingProperty(String name); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OAuthFlow.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OAuthFlow.java index a0c7b5e7..2135c367 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OAuthFlow.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OAuthFlow.java @@ -9,99 +9,99 @@ public interface OAuthFlow extends IJsonOverlay, IModelPart { - // AuthorizationUrl - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getAuthorizationUrl(); + // AuthorizationUrl + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getAuthorizationUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAuthorizationUrl(String authorizationUrl); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAuthorizationUrl(String authorizationUrl); - // TokenUrl - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getTokenUrl(); + // TokenUrl + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getTokenUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTokenUrl(String tokenUrl); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTokenUrl(String tokenUrl); - // RefreshUrl - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getRefreshUrl(); + // RefreshUrl + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getRefreshUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRefreshUrl(String refreshUrl); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRefreshUrl(String refreshUrl); - // Scope - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getScopes(); + // Scope + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getScopes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getScopes(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getScopes(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasScopes(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasScopes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasScope(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasScope(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getScope(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getScope(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setScopes(Map scopes); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setScopes(Map scopes); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setScope(String name, String scope); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setScope(String name, String scope); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeScope(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeScope(String name); - // ScopesExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getScopesExtensions(); + // ScopesExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getScopesExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getScopesExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getScopesExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasScopesExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasScopesExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasScopesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasScopesExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getScopesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getScopesExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setScopesExtensions(Map scopesExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setScopesExtensions(Map scopesExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setScopesExtension(String name, Object scopesExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setScopesExtension(String name, Object scopesExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeScopesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeScopesExtension(String name); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OpenApi3.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OpenApi3.java index d51db5e9..b6c4d925 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OpenApi3.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/OpenApi3.java @@ -13,447 +13,447 @@ public interface OpenApi3 extends IJsonOverlay, IModelPart, OpenApi { - public void validate(); + public void validate(); - public boolean isValid(); + public boolean isValid(); - public ValidationResults getValidationResults(); + public ValidationResults getValidationResults(); - public Collection getValidationItems(); + public Collection getValidationItems(); - // OpenApi - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getOpenApi(); + // OpenApi + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getOpenApi(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOpenApi(String openApi); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOpenApi(String openApi); - // Info - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Info getInfo(); + // Info + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Info getInfo(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Info getInfo(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Info getInfo(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setInfo(Info info); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setInfo(Info info); - // Server - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getServers(); + // Server + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getServers(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getServers(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getServers(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasServers(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasServers(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Server getServer(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Server getServer(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServers(List servers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServers(List servers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServer(int index, Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServer(int index, Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addServer(Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addServer(Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertServer(int index, Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertServer(int index, Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeServer(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeServer(int index); - // Path - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getPaths(); + // Path + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getPaths(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getPaths(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getPaths(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasPaths(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasPaths(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasPath(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasPath(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Path getPath(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Path getPath(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPaths(Map paths); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPaths(Map paths); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPath(String name, Path path); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPath(String name, Path path); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removePath(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removePath(String name); - // PathsExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getPathsExtensions(); + // PathsExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getPathsExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getPathsExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getPathsExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasPathsExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasPathsExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasPathsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasPathsExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getPathsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getPathsExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPathsExtensions(Map pathsExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPathsExtensions(Map pathsExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPathsExtension(String name, Object pathsExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPathsExtension(String name, Object pathsExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removePathsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removePathsExtension(String name); - // Schema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getSchemas(); + // Schema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getSchemas(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getSchemas(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasSchemas(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasSchema(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasSchema(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSchemas(Map schemas); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSchemas(Map schemas); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSchema(String name, Schema schema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSchema(String name, Schema schema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeSchema(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeSchema(String name); - // Response - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getResponses(); + // Response + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getResponses(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getResponses(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getResponses(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasResponses(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasResponses(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasResponse(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasResponse(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Response getResponse(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Response getResponse(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setResponses(Map responses); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setResponses(Map responses); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setResponse(String name, Response response); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setResponse(String name, Response response); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeResponse(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeResponse(String name); - // Parameter - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getParameters(); + // Parameter + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getParameters(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getParameters(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameters(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameter(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameter(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Parameter getParameter(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Parameter getParameter(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameters(Map parameters); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameters(Map parameters); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameter(String name, Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameter(String name, Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeParameter(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeParameter(String name); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExamples(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Example getExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Example getExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExamples(Map examples); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExamples(Map examples); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(String name, Example example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(String name, Example example); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExample(String name); - // RequestBody - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getRequestBodies(); + // RequestBody + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getRequestBodies(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getRequestBodies(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getRequestBodies(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasRequestBodies(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasRequestBodies(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasRequestBody(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasRequestBody(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - RequestBody getRequestBody(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + RequestBody getRequestBody(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequestBodies(Map requestBodies); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequestBodies(Map requestBodies); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequestBody(String name, RequestBody requestBody); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequestBody(String name, RequestBody requestBody); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeRequestBody(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeRequestBody(String name); - // Header - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(); + // Header + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeaders(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Header getHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Header getHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeaders(Map headers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeaders(Map headers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeader(String name, Header header); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeader(String name, Header header); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeHeader(String name); - // SecurityScheme - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getSecuritySchemes(); + // SecurityScheme + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getSecuritySchemes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getSecuritySchemes(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getSecuritySchemes(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasSecuritySchemes(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasSecuritySchemes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasSecurityScheme(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasSecurityScheme(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - SecurityScheme getSecurityScheme(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + SecurityScheme getSecurityScheme(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSecuritySchemes(Map securitySchemes); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSecuritySchemes(Map securitySchemes); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSecurityScheme(String name, SecurityScheme securityScheme); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSecurityScheme(String name, SecurityScheme securityScheme); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeSecurityScheme(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeSecurityScheme(String name); - // Link - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getLinks(); + // Link + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getLinks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getLinks(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getLinks(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasLinks(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasLinks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasLink(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasLink(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Link getLink(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Link getLink(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setLinks(Map links); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setLinks(Map links); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setLink(String name, Link link); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setLink(String name, Link link); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeLink(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeLink(String name); - // Callback - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbacks(); + // Callback + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbacks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbacks(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbacks(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallbacks(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallbacks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallback(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallback(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Callback getCallback(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Callback getCallback(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallbacks(Map callbacks); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallbacks(Map callbacks); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallback(String name, Callback callback); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallback(String name, Callback callback); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeCallback(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeCallback(String name); - // ComponentsExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getComponentsExtensions(); + // ComponentsExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getComponentsExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getComponentsExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getComponentsExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasComponentsExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasComponentsExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasComponentsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasComponentsExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getComponentsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getComponentsExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setComponentsExtensions(Map componentsExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setComponentsExtensions(Map componentsExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setComponentsExtension(String name, Object componentsExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setComponentsExtension(String name, Object componentsExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeComponentsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeComponentsExtension(String name); - // SecurityRequirement - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getSecurityRequirements(); + // SecurityRequirement + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getSecurityRequirements(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getSecurityRequirements(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getSecurityRequirements(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasSecurityRequirements(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasSecurityRequirements(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - SecurityRequirement getSecurityRequirement(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + SecurityRequirement getSecurityRequirement(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSecurityRequirements(List securityRequirements); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSecurityRequirements(List securityRequirements); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSecurityRequirement(int index, SecurityRequirement securityRequirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSecurityRequirement(int index, SecurityRequirement securityRequirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addSecurityRequirement(SecurityRequirement securityRequirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addSecurityRequirement(SecurityRequirement securityRequirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertSecurityRequirement(int index, SecurityRequirement securityRequirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertSecurityRequirement(int index, SecurityRequirement securityRequirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeSecurityRequirement(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeSecurityRequirement(int index); - // Tag - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getTags(); + // Tag + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getTags(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getTags(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getTags(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasTags(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasTags(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Tag getTag(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Tag getTag(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTags(List tags); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTags(List tags); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTag(int index, Tag tag); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTag(int index, Tag tag); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addTag(Tag tag); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addTag(Tag tag); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertTag(int index, Tag tag); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertTag(int index, Tag tag); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeTag(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeTag(int index); - // ExternalDocs - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(); + // ExternalDocs + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExternalDocs(ExternalDocs externalDocs); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExternalDocs(ExternalDocs externalDocs); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Operation.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Operation.java index c79e6dc5..820ba485 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Operation.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Operation.java @@ -10,291 +10,291 @@ public interface Operation extends IJsonOverlay, IModelPart { - // Tag - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getTags(); + // Tag + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getTags(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getTags(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getTags(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasTags(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasTags(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getTag(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getTag(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTags(List tags); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTags(List tags); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTag(int index, String tag); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTag(int index, String tag); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addTag(String tag); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addTag(String tag); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertTag(int index, String tag); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertTag(int index, String tag); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeTag(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeTag(int index); - // Summary - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getSummary(); + // Summary + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getSummary(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSummary(String summary); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSummary(String summary); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // ExternalDocs - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(); + // ExternalDocs + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExternalDocs(ExternalDocs externalDocs); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExternalDocs(ExternalDocs externalDocs); - // OperationId - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getOperationId(); + // OperationId + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getOperationId(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOperationId(String operationId); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOperationId(String operationId); - // Parameter - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getParameters(); + // Parameter + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getParameters(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getParameters(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameters(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Parameter getParameter(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Parameter getParameter(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameters(List parameters); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameters(List parameters); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameter(int index, Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameter(int index, Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addParameter(Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addParameter(Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertParameter(int index, Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertParameter(int index, Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeParameter(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeParameter(int index); - // RequestBody - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - RequestBody getRequestBody(); + // RequestBody + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + RequestBody getRequestBody(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - RequestBody getRequestBody(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + RequestBody getRequestBody(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequestBody(RequestBody requestBody); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequestBody(RequestBody requestBody); - // Response - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getResponses(); + // Response + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getResponses(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getResponses(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getResponses(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasResponses(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasResponses(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasResponse(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasResponse(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Response getResponse(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Response getResponse(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setResponses(Map responses); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setResponses(Map responses); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setResponse(String name, Response response); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setResponse(String name, Response response); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeResponse(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeResponse(String name); - // ResponsesExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getResponsesExtensions(); + // ResponsesExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getResponsesExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getResponsesExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getResponsesExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasResponsesExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasResponsesExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasResponsesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasResponsesExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getResponsesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getResponsesExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setResponsesExtensions(Map responsesExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setResponsesExtensions(Map responsesExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setResponsesExtension(String name, Object responsesExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setResponsesExtension(String name, Object responsesExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeResponsesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeResponsesExtension(String name); - // Callback - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbacks(); + // Callback + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbacks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbacks(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbacks(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallbacks(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallbacks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallback(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallback(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Callback getCallback(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Callback getCallback(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallbacks(Map callbacks); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallbacks(Map callbacks); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallback(String name, Callback callback); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallback(String name, Callback callback); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeCallback(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeCallback(String name); - // CallbacksExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbacksExtensions(); + // CallbacksExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbacksExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getCallbacksExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getCallbacksExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallbacksExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallbacksExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasCallbacksExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasCallbacksExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getCallbacksExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getCallbacksExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallbacksExtensions(Map callbacksExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallbacksExtensions(Map callbacksExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setCallbacksExtension(String name, Object callbacksExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setCallbacksExtension(String name, Object callbacksExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeCallbacksExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeCallbacksExtension(String name); - // Deprecated - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getDeprecated(); + // Deprecated + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isDeprecated(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDeprecated(Boolean deprecated); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDeprecated(Boolean deprecated); - // SecurityRequirement - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getSecurityRequirements(); + // SecurityRequirement + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getSecurityRequirements(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getSecurityRequirements(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getSecurityRequirements(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasSecurityRequirements(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasSecurityRequirements(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - SecurityRequirement getSecurityRequirement(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + SecurityRequirement getSecurityRequirement(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSecurityRequirements(List securityRequirements); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSecurityRequirements(List securityRequirements); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSecurityRequirement(int index, SecurityRequirement securityRequirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSecurityRequirement(int index, SecurityRequirement securityRequirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addSecurityRequirement(SecurityRequirement securityRequirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addSecurityRequirement(SecurityRequirement securityRequirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertSecurityRequirement(int index, SecurityRequirement securityRequirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertSecurityRequirement(int index, SecurityRequirement securityRequirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeSecurityRequirement(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeSecurityRequirement(int index); - // Server - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getServers(); + // Server + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getServers(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getServers(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getServers(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasServers(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasServers(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Server getServer(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Server getServer(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServers(List servers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServers(List servers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServer(int index, Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServer(int index, Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addServer(Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addServer(Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertServer(int index, Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertServer(int index, Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeServer(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeServer(int index); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Parameter.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Parameter.java index b75c2999..9ac0f846 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Parameter.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Parameter.java @@ -9,175 +9,175 @@ public interface Parameter extends IJsonOverlay, IModelPart { - String getKey(); + String getKey(); - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // In - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getIn(); + // In + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getIn(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setIn(String in); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setIn(String in); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Required - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getRequired(); + // Required + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getRequired(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isRequired(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isRequired(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequired(Boolean required); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequired(Boolean required); - // Deprecated - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getDeprecated(); + // Deprecated + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isDeprecated(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDeprecated(Boolean deprecated); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDeprecated(Boolean deprecated); - // AllowEmptyValue - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getAllowEmptyValue(); + // AllowEmptyValue + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getAllowEmptyValue(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isAllowEmptyValue(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isAllowEmptyValue(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAllowEmptyValue(Boolean allowEmptyValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAllowEmptyValue(Boolean allowEmptyValue); - // Style - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getStyle(); + // Style + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getStyle(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setStyle(String style); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setStyle(String style); - // Explode - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getExplode(); + // Explode + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getExplode(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isExplode(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isExplode(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExplode(Boolean explode); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExplode(Boolean explode); - // AllowReserved - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getAllowReserved(); + // AllowReserved + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getAllowReserved(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isAllowReserved(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isAllowReserved(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAllowReserved(Boolean allowReserved); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAllowReserved(Boolean allowReserved); - // Schema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(); + // Schema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getSchema(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getSchema(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSchema(Schema schema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSchema(Schema schema); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExample(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExample(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(Object example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(Object example); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExamples(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Example getExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Example getExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExamples(Map examples); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExamples(Map examples); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(String name, Example example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(String name, Example example); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExample(String name); - // ContentMediaType - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(); + // ContentMediaType + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaTypes(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - MediaType getContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + MediaType getContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaTypes(Map contentMediaTypes); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaTypes(Map contentMediaTypes); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaType(String name, MediaType contentMediaType); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaType(String name, MediaType contentMediaType); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeContentMediaType(String name); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Path.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Path.java index 99d05bf2..f1e721e7 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Path.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Path.java @@ -10,205 +10,205 @@ public interface Path extends IJsonOverlay, IModelPart { - String getPathString(); + String getPathString(); - // Summary - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getSummary(); + // Summary + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getSummary(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setSummary(String summary); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setSummary(String summary); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Operation - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getOperations(); + // Operation + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getOperations(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getOperations(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getOperations(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasOperations(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasOperations(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasOperation(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasOperation(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getOperation(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getOperation(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOperations(Map operations); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOperations(Map operations); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOperation(String name, Operation operation); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOperation(String name, Operation operation); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeOperation(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeOperation(String name); - // Get - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getGet(); + // Get + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getGet(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getGet(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getGet(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setGet(Operation get); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setGet(Operation get); - // Put - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getPut(); + // Put + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getPut(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getPut(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getPut(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPut(Operation put); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPut(Operation put); - // Post - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getPost(); + // Post + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getPost(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getPost(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getPost(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPost(Operation post); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPost(Operation post); - // Delete - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getDelete(); + // Delete + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getDelete(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getDelete(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getDelete(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDelete(Operation delete); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDelete(Operation delete); - // Options - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getOptions(); + // Options + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getOptions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getOptions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getOptions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOptions(Operation options); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOptions(Operation options); - // Head - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getHead(); + // Head + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getHead(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getHead(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getHead(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHead(Operation head); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHead(Operation head); - // Patch - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getPatch(); + // Patch + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getPatch(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getPatch(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getPatch(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPatch(Operation patch); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPatch(Operation patch); - // Trace - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getTrace(); + // Trace + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getTrace(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Operation getTrace(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Operation getTrace(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTrace(Operation trace); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTrace(Operation trace); - // Server - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getServers(); + // Server + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getServers(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getServers(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getServers(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasServers(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasServers(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Server getServer(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Server getServer(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServers(List servers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServers(List servers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServer(int index, Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServer(int index, Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addServer(Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addServer(Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertServer(int index, Server server); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertServer(int index, Server server); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeServer(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeServer(int index); - // Parameter - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getParameters(); + // Parameter + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getParameters(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getParameters(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameters(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Parameter getParameter(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Parameter getParameter(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameters(List parameters); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameters(List parameters); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameter(int index, Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameter(int index, Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addParameter(Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addParameter(Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertParameter(int index, Parameter parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertParameter(int index, Parameter parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeParameter(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeParameter(int index); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/RequestBody.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/RequestBody.java index 7cab6543..79850c1d 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/RequestBody.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/RequestBody.java @@ -9,72 +9,72 @@ public interface RequestBody extends IJsonOverlay, IModelPart { - String getName(); + String getName(); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // ContentMediaType - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(); + // ContentMediaType + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaTypes(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - MediaType getContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + MediaType getContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaTypes(Map contentMediaTypes); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaTypes(Map contentMediaTypes); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaType(String name, MediaType contentMediaType); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaType(String name, MediaType contentMediaType); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeContentMediaType(String name); - // Required - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getRequired(); + // Required + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getRequired(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isRequired(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isRequired(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequired(Boolean required); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequired(Boolean required); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Response.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Response.java index e1511ab0..cd78cbc8 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Response.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Response.java @@ -9,112 +9,112 @@ public interface Response extends IJsonOverlay, IModelPart { - String getName(); + String getName(); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Header - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(); + // Header + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getHeaders(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getHeaders(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeaders(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeaders(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Header getHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Header getHeader(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeaders(Map headers); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeaders(Map headers); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setHeader(String name, Header header); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setHeader(String name, Header header); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeHeader(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeHeader(String name); - // ContentMediaType - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(); + // ContentMediaType + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getContentMediaTypes(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getContentMediaTypes(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaTypes(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaTypes(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - MediaType getContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + MediaType getContentMediaType(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaTypes(Map contentMediaTypes); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaTypes(Map contentMediaTypes); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setContentMediaType(String name, MediaType contentMediaType); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setContentMediaType(String name, MediaType contentMediaType); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeContentMediaType(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeContentMediaType(String name); - // Link - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getLinks(); + // Link + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getLinks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getLinks(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getLinks(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasLinks(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasLinks(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasLink(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasLink(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Link getLink(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Link getLink(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setLinks(Map links); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setLinks(Map links); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setLink(String name, Link link); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setLink(String name, Link link); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeLink(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeLink(String name); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Schema.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Schema.java index 7c8cd096..88b4f26b 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Schema.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Schema.java @@ -10,469 +10,469 @@ public interface Schema extends IJsonOverlay, IModelPart { - String getName(); + String getName(); - // Title - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getTitle(); + // Title + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getTitle(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setTitle(String title); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setTitle(String title); - // MultipleOf - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Number getMultipleOf(); + // MultipleOf + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Number getMultipleOf(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMultipleOf(Number multipleOf); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMultipleOf(Number multipleOf); - // Maximum - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Number getMaximum(); + // Maximum + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Number getMaximum(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMaximum(Number maximum); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMaximum(Number maximum); - // ExclusiveMaximum - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getExclusiveMaximum(); + // ExclusiveMaximum + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getExclusiveMaximum(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isExclusiveMaximum(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isExclusiveMaximum(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExclusiveMaximum(Boolean exclusiveMaximum); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExclusiveMaximum(Boolean exclusiveMaximum); - // Minimum - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Number getMinimum(); + // Minimum + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Number getMinimum(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMinimum(Number minimum); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMinimum(Number minimum); - // ExclusiveMinimum - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getExclusiveMinimum(); + // ExclusiveMinimum + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getExclusiveMinimum(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isExclusiveMinimum(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isExclusiveMinimum(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExclusiveMinimum(Boolean exclusiveMinimum); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExclusiveMinimum(Boolean exclusiveMinimum); - // MaxLength - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Integer getMaxLength(); + // MaxLength + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Integer getMaxLength(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMaxLength(Integer maxLength); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMaxLength(Integer maxLength); - // MinLength - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Integer getMinLength(); + // MinLength + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Integer getMinLength(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMinLength(Integer minLength); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMinLength(Integer minLength); - // Pattern - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getPattern(); + // Pattern + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getPattern(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPattern(String pattern); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPattern(String pattern); - // MaxItems - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Integer getMaxItems(); + // MaxItems + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Integer getMaxItems(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMaxItems(Integer maxItems); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMaxItems(Integer maxItems); - // MinItems - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Integer getMinItems(); + // MinItems + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Integer getMinItems(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMinItems(Integer minItems); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMinItems(Integer minItems); - // UniqueItems - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getUniqueItems(); + // UniqueItems + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getUniqueItems(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isUniqueItems(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isUniqueItems(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setUniqueItems(Boolean uniqueItems); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setUniqueItems(Boolean uniqueItems); - // MaxProperties - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Integer getMaxProperties(); + // MaxProperties + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Integer getMaxProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMaxProperties(Integer maxProperties); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMaxProperties(Integer maxProperties); - // MinProperties - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Integer getMinProperties(); + // MinProperties + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Integer getMinProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setMinProperties(Integer minProperties); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setMinProperties(Integer minProperties); - // RequiredField - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getRequiredFields(); + // RequiredField + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getRequiredFields(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getRequiredFields(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getRequiredFields(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasRequiredFields(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasRequiredFields(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getRequiredField(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getRequiredField(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequiredFields(List requiredFields); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequiredFields(List requiredFields); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequiredField(int index, String requiredField); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequiredField(int index, String requiredField); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addRequiredField(String requiredField); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addRequiredField(String requiredField); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertRequiredField(int index, String requiredField); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertRequiredField(int index, String requiredField); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeRequiredField(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeRequiredField(int index); - // Enum - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getEnums(); + // Enum + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getEnums(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getEnums(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getEnums(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasEnums(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasEnums(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getEnum(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getEnum(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEnums(List enums); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEnums(List enums); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEnum(int index, Object enumValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEnum(int index, Object enumValue); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addEnum(Object enumValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addEnum(Object enumValue); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertEnum(int index, Object enumValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertEnum(int index, Object enumValue); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeEnum(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeEnum(int index); - // Type - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getType(); + // Type + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getType(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setType(String type); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setType(String type); - // AllOfSchema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getAllOfSchemas(); + // AllOfSchema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getAllOfSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getAllOfSchemas(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getAllOfSchemas(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasAllOfSchemas(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasAllOfSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getAllOfSchema(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getAllOfSchema(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAllOfSchemas(List allOfSchemas); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAllOfSchemas(List allOfSchemas); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAllOfSchema(int index, Schema allOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAllOfSchema(int index, Schema allOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addAllOfSchema(Schema allOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addAllOfSchema(Schema allOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertAllOfSchema(int index, Schema allOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertAllOfSchema(int index, Schema allOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeAllOfSchema(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeAllOfSchema(int index); - // OneOfSchema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getOneOfSchemas(); + // OneOfSchema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getOneOfSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getOneOfSchemas(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getOneOfSchemas(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasOneOfSchemas(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasOneOfSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getOneOfSchema(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getOneOfSchema(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOneOfSchemas(List oneOfSchemas); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOneOfSchemas(List oneOfSchemas); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOneOfSchema(int index, Schema oneOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOneOfSchema(int index, Schema oneOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addOneOfSchema(Schema oneOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addOneOfSchema(Schema oneOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertOneOfSchema(int index, Schema oneOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertOneOfSchema(int index, Schema oneOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeOneOfSchema(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeOneOfSchema(int index); - // AnyOfSchema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getAnyOfSchemas(); + // AnyOfSchema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getAnyOfSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getAnyOfSchemas(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getAnyOfSchemas(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasAnyOfSchemas(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasAnyOfSchemas(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getAnyOfSchema(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getAnyOfSchema(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAnyOfSchemas(List anyOfSchemas); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAnyOfSchemas(List anyOfSchemas); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAnyOfSchema(int index, Schema anyOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAnyOfSchema(int index, Schema anyOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addAnyOfSchema(Schema anyOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addAnyOfSchema(Schema anyOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertAnyOfSchema(int index, Schema anyOfSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertAnyOfSchema(int index, Schema anyOfSchema); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeAnyOfSchema(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeAnyOfSchema(int index); - // NotSchema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getNotSchema(); + // NotSchema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getNotSchema(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getNotSchema(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getNotSchema(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setNotSchema(Schema notSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setNotSchema(Schema notSchema); - // ItemsSchema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getItemsSchema(); + // ItemsSchema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getItemsSchema(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getItemsSchema(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getItemsSchema(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setItemsSchema(Schema itemsSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setItemsSchema(Schema itemsSchema); - // Property - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getProperties(); + // Property + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getProperties(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getProperties(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasProperties(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasProperty(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasProperty(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getProperty(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getProperty(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setProperties(Map properties); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setProperties(Map properties); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setProperty(String name, Schema property); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setProperty(String name, Schema property); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeProperty(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeProperty(String name); - // AdditionalPropertiesSchema - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getAdditionalPropertiesSchema(); + // AdditionalPropertiesSchema + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getAdditionalPropertiesSchema(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Schema getAdditionalPropertiesSchema(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Schema getAdditionalPropertiesSchema(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAdditionalPropertiesSchema(Schema additionalPropertiesSchema); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAdditionalPropertiesSchema(Schema additionalPropertiesSchema); - // AdditionalProperties - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getAdditionalProperties(); + // AdditionalProperties + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getAdditionalProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isAdditionalProperties(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isAdditionalProperties(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAdditionalProperties(Boolean additionalProperties); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAdditionalProperties(Boolean additionalProperties); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Format - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getFormat(); + // Format + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getFormat(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setFormat(String format); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setFormat(String format); - // Default - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getDefault(); + // Default + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getDefault(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDefault(Object defaultValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDefault(Object defaultValue); - // Nullable - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getNullable(); + // Nullable + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getNullable(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isNullable(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isNullable(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setNullable(Boolean nullable); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setNullable(Boolean nullable); - // Discriminator - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDiscriminator(); + // Discriminator + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDiscriminator(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDiscriminator(String discriminator); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDiscriminator(String discriminator); - // ReadOnly - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getReadOnly(); + // ReadOnly + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getReadOnly(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isReadOnly(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isReadOnly(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setReadOnly(Boolean readOnly); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setReadOnly(Boolean readOnly); - // WriteOnly - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getWriteOnly(); + // WriteOnly + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getWriteOnly(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isWriteOnly(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isWriteOnly(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setWriteOnly(Boolean writeOnly); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setWriteOnly(Boolean writeOnly); - // Xml - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Xml getXml(); + // Xml + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Xml getXml(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Xml getXml(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Xml getXml(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setXml(Xml xml); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setXml(Xml xml); - // ExternalDocs - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(); + // ExternalDocs + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExternalDocs(ExternalDocs externalDocs); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExternalDocs(ExternalDocs externalDocs); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExamples(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExamples(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExamples(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExamples(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Example getExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Example getExample(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExamples(Map examples); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExamples(Map examples); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(String name, Example example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(String name, Example example); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExample(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExample(String name); - // Example - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExample(); + // Example + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExample(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExample(Object example); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExample(Object example); - // Deprecated - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getDeprecated(); + // Deprecated + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isDeprecated(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isDeprecated(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDeprecated(Boolean deprecated); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDeprecated(Boolean deprecated); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityParameter.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityParameter.java index 0fdafc15..0d449c3d 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityParameter.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityParameter.java @@ -9,31 +9,31 @@ public interface SecurityParameter extends IJsonOverlay, IModelPart { - // Parameter - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getParameters(); + // Parameter + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getParameters(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getParameters(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasParameters(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasParameters(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getParameter(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getParameter(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameters(List parameters); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameters(List parameters); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setParameter(int index, String parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setParameter(int index, String parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addParameter(String parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addParameter(String parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertParameter(int index, String parameter); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertParameter(int index, String parameter); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeParameter(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeParameter(int index); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityRequirement.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityRequirement.java index 6dc093a9..9b79ebdb 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityRequirement.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityRequirement.java @@ -8,30 +8,30 @@ import com.reprezen.jsonoverlay.IModelPart; public interface SecurityRequirement - extends IJsonOverlay, IModelPart { + extends IJsonOverlay, IModelPart { - // Requirement - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getRequirements(); + // Requirement + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getRequirements(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getRequirements(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getRequirements(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasRequirements(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasRequirements(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasRequirement(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasRequirement(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - SecurityParameter getRequirement(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + SecurityParameter getRequirement(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequirements(Map requirements); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequirements(Map requirements); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setRequirement(String name, SecurityParameter requirement); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setRequirement(String name, SecurityParameter requirement); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeRequirement(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeRequirement(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityScheme.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityScheme.java index a971addf..613434fe 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityScheme.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/SecurityScheme.java @@ -9,144 +9,144 @@ public interface SecurityScheme extends IJsonOverlay, IModelPart { - String getKey(); + String getKey(); - // Type - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getType(); + // Type + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getType(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setType(String type); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setType(String type); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // In - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getIn(); + // In + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getIn(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setIn(String in); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setIn(String in); - // Scheme - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getScheme(); + // Scheme + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getScheme(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setScheme(String scheme); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setScheme(String scheme); - // BearerFormat - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getBearerFormat(); + // BearerFormat + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getBearerFormat(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setBearerFormat(String bearerFormat); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setBearerFormat(String bearerFormat); - // ImplicitOAuthFlow - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getImplicitOAuthFlow(); + // ImplicitOAuthFlow + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getImplicitOAuthFlow(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getImplicitOAuthFlow(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getImplicitOAuthFlow(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setImplicitOAuthFlow(OAuthFlow implicitOAuthFlow); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setImplicitOAuthFlow(OAuthFlow implicitOAuthFlow); - // PasswordOAuthFlow - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getPasswordOAuthFlow(); + // PasswordOAuthFlow + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getPasswordOAuthFlow(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getPasswordOAuthFlow(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getPasswordOAuthFlow(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPasswordOAuthFlow(OAuthFlow passwordOAuthFlow); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPasswordOAuthFlow(OAuthFlow passwordOAuthFlow); - // ClientCredentialsOAuthFlow - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getClientCredentialsOAuthFlow(); + // ClientCredentialsOAuthFlow + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getClientCredentialsOAuthFlow(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getClientCredentialsOAuthFlow(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getClientCredentialsOAuthFlow(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setClientCredentialsOAuthFlow(OAuthFlow clientCredentialsOAuthFlow); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setClientCredentialsOAuthFlow(OAuthFlow clientCredentialsOAuthFlow); - // AuthorizationCodeOAuthFlow - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getAuthorizationCodeOAuthFlow(); + // AuthorizationCodeOAuthFlow + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getAuthorizationCodeOAuthFlow(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - OAuthFlow getAuthorizationCodeOAuthFlow(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + OAuthFlow getAuthorizationCodeOAuthFlow(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAuthorizationCodeOAuthFlow(OAuthFlow authorizationCodeOAuthFlow); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAuthorizationCodeOAuthFlow(OAuthFlow authorizationCodeOAuthFlow); - // OAuthFlowsExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getOAuthFlowsExtensions(); + // OAuthFlowsExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getOAuthFlowsExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getOAuthFlowsExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getOAuthFlowsExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasOAuthFlowsExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasOAuthFlowsExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasOAuthFlowsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasOAuthFlowsExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getOAuthFlowsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getOAuthFlowsExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOAuthFlowsExtensions(Map oAuthFlowsExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOAuthFlowsExtensions(Map oAuthFlowsExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOAuthFlowsExtension(String name, Object oAuthFlowsExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOAuthFlowsExtension(String name, Object oAuthFlowsExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeOAuthFlowsExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeOAuthFlowsExtension(String name); - // OpenIdConnectUrl - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getOpenIdConnectUrl(); + // OpenIdConnectUrl + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getOpenIdConnectUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setOpenIdConnectUrl(String openIdConnectUrl); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setOpenIdConnectUrl(String openIdConnectUrl); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Server.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Server.java index 4412f18b..1a70e5e4 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Server.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Server.java @@ -9,92 +9,92 @@ public interface Server extends IJsonOverlay, IModelPart { - // Url - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getUrl(); + // Url + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getUrl(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setUrl(String url); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setUrl(String url); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // ServerVariable - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getServerVariables(); + // ServerVariable + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getServerVariables(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getServerVariables(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getServerVariables(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasServerVariables(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasServerVariables(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasServerVariable(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasServerVariable(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ServerVariable getServerVariable(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ServerVariable getServerVariable(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServerVariables(Map serverVariables); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServerVariables(Map serverVariables); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setServerVariable(String name, ServerVariable serverVariable); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setServerVariable(String name, ServerVariable serverVariable); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeServerVariable(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeServerVariable(String name); - // VariablesExtension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getVariablesExtensions(); + // VariablesExtension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getVariablesExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getVariablesExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getVariablesExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasVariablesExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasVariablesExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasVariablesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasVariablesExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getVariablesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getVariablesExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setVariablesExtensions(Map variablesExtensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setVariablesExtensions(Map variablesExtensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setVariablesExtension(String name, Object variablesExtension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setVariablesExtension(String name, Object variablesExtension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeVariablesExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeVariablesExtension(String name); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ServerVariable.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ServerVariable.java index e90c33b8..42164e77 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ServerVariable.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/ServerVariable.java @@ -10,70 +10,70 @@ public interface ServerVariable extends IJsonOverlay, IModelPart { - // EnumValue - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getEnumValues(); + // EnumValue + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getEnumValues(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - List getEnumValues(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + List getEnumValues(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasEnumValues(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasEnumValues(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getEnumValue(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getEnumValue(int index); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEnumValues(List enumValues); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEnumValues(List enumValues); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setEnumValue(int index, Object enumValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setEnumValue(int index, Object enumValue); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void addEnumValue(Object enumValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void addEnumValue(Object enumValue); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void insertEnumValue(int index, Object enumValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void insertEnumValue(int index, Object enumValue); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeEnumValue(int index); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeEnumValue(int index); - // Default - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getDefault(); + // Default + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getDefault(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDefault(Object defaultValue); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDefault(Object defaultValue); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Tag.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Tag.java index bc86226d..6bf3b024 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Tag.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Tag.java @@ -9,52 +9,52 @@ public interface Tag extends IJsonOverlay, IModelPart { - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // Description - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getDescription(); + // Description + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getDescription(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setDescription(String description); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setDescription(String description); - // ExternalDocs - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(); + // ExternalDocs + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - ExternalDocs getExternalDocs(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + ExternalDocs getExternalDocs(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExternalDocs(ExternalDocs externalDocs); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExternalDocs(ExternalDocs externalDocs); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Xml.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Xml.java index a17490c1..8347bd10 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Xml.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/model3/Xml.java @@ -9,69 +9,69 @@ public interface Xml extends IJsonOverlay, IModelPart { - // Name - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getName(); + // Name + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getName(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setName(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setName(String name); - // Namespace - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getNamespace(); + // Namespace + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getNamespace(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setNamespace(String namespace); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setNamespace(String namespace); - // Prefix - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - String getPrefix(); + // Prefix + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + String getPrefix(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setPrefix(String prefix); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setPrefix(String prefix); - // Attribute - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getAttribute(); + // Attribute + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getAttribute(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isAttribute(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isAttribute(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setAttribute(Boolean attribute); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setAttribute(Boolean attribute); - // Wrapped - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Boolean getWrapped(); + // Wrapped + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Boolean getWrapped(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean isWrapped(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean isWrapped(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setWrapped(Boolean wrapped); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setWrapped(Boolean wrapped); - // Extension - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(); + // Extension + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Map getExtensions(boolean elaborate); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Map getExtensions(boolean elaborate); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtensions(); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtensions(); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - boolean hasExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + boolean hasExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - Object getExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + Object getExtension(String name); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtensions(Map extensions); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtensions(Map extensions); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void setExtension(String name, Object extension); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void setExtension(String name, Object extension); - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - void removeExtension(String name); + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + void removeExtension(String name); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/CallbackImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/CallbackImpl.java index 525e1daa..a02699c1 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/CallbackImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/CallbackImpl.java @@ -18,180 +18,180 @@ public class CallbackImpl extends PropertiesOverlay implements Callback { - private Overlay overlay = Overlay.of(this); - - @Override - public String getName() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public CallbackImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public CallbackImpl(Callback callback, JsonOverlay parent, ReferenceManager refMgr) { - super(callback, parent, factory, refMgr); - } - - // CallbackPath - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbackPaths() { - return _getMap("callbackPaths", Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbackPaths(boolean elaborate) { - return _getMap("callbackPaths", elaborate, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallbackPaths() { - return _isPresent("callbackPaths"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallbackPath(String expression) { - return _getMap("callbackPaths", Path.class).containsKey(expression); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Path getCallbackPath(String expression) { - return _get("callbackPaths", expression, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallbackPaths(Map callbackPaths) { - _setMap("callbackPaths", callbackPaths, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallbackPath(String expression, Path callbackPath) { - _set("callbackPaths", expression, callbackPath, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeCallbackPath(String expression) { - _remove("callbackPaths", expression, Path.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createMap("callbackPaths", "", PathImpl.factory, "(?!x-).*"); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return CallbackImpl.class; - } - - @Override - public JsonOverlay _create(Callback callback, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new CallbackImpl(callback, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new CallbackImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Callback callback) { - return Callback.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Callback.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getName() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public CallbackImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public CallbackImpl(Callback callback, JsonOverlay parent, ReferenceManager refMgr) { + super(callback, parent, factory, refMgr); + } + + // CallbackPath + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbackPaths() { + return _getMap("callbackPaths", Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbackPaths(boolean elaborate) { + return _getMap("callbackPaths", elaborate, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallbackPaths() { + return _isPresent("callbackPaths"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallbackPath(String expression) { + return _getMap("callbackPaths", Path.class).containsKey(expression); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Path getCallbackPath(String expression) { + return _get("callbackPaths", expression, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallbackPaths(Map callbackPaths) { + _setMap("callbackPaths", callbackPaths, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallbackPath(String expression, Path callbackPath) { + _set("callbackPaths", expression, callbackPath, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeCallbackPath(String expression) { + _remove("callbackPaths", expression, Path.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createMap("callbackPaths", "", PathImpl.factory, "(?!x-).*"); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return CallbackImpl.class; + } + + @Override + public JsonOverlay _create(Callback callback, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new CallbackImpl(callback, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new CallbackImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Callback callback) { + return Callback.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Callback.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ContactImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ContactImpl.java index 945c2f5a..35aa19e6 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ContactImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ContactImpl.java @@ -16,165 +16,165 @@ public class ContactImpl extends PropertiesOverlay implements Contact { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ContactImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ContactImpl(Contact contact, JsonOverlay parent, ReferenceManager refMgr) { - super(contact, parent, factory, refMgr); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // Url - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getUrl() { - return _get("url", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setUrl(String url) { - _setScalar("url", url, String.class); - } - - // Email - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getEmail() { - return _get("email", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEmail(String email) { - _setScalar("email", email, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("url", "url", StringOverlay.factory); - _createScalar("email", "email", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ContactImpl.class; - } - - @Override - public JsonOverlay _create(Contact contact, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ContactImpl(contact, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ContactImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Contact contact) { - return Contact.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Contact.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ContactImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ContactImpl(Contact contact, JsonOverlay parent, ReferenceManager refMgr) { + super(contact, parent, factory, refMgr); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // Url + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getUrl() { + return _get("url", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setUrl(String url) { + _setScalar("url", url, String.class); + } + + // Email + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getEmail() { + return _get("email", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEmail(String email) { + _setScalar("email", email, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("url", "url", StringOverlay.factory); + _createScalar("email", "email", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return ContactImpl.class; + } + + @Override + public JsonOverlay _create(Contact contact, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ContactImpl(contact, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ContactImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Contact contact) { + return Contact.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Contact.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/EncodingPropertyImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/EncodingPropertyImpl.java index d8bbda0e..660b05b2 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/EncodingPropertyImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/EncodingPropertyImpl.java @@ -17,223 +17,223 @@ public class EncodingPropertyImpl extends PropertiesOverlay implements EncodingProperty { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public EncodingPropertyImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public EncodingPropertyImpl(EncodingProperty encodingProperty, JsonOverlay parent, ReferenceManager refMgr) { - super(encodingProperty, parent, factory, refMgr); - } - - // ContentType - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getContentType() { - return _get("contentType", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentType(String contentType) { - _setScalar("contentType", contentType, String.class); - } - - // Header - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders() { - return _getMap("headers", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders(boolean elaborate) { - return _getMap("headers", elaborate, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeaders() { - return _isPresent("headers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeader(String name) { - return _getMap("headers", String.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getHeader(String name) { - return _get("headers", name, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeaders(Map headers) { - _setMap("headers", headers, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeader(String name, String header) { - _set("headers", name, header, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeHeader(String name) { - _remove("headers", name, String.class); - } - - // Style - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getStyle() { - return _get("style", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setStyle(String style) { - _setScalar("style", style, String.class); - } - - // Explode - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getExplode() { - return _get("explode", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isExplode() { - Boolean bool = _get("explode", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExplode(Boolean explode) { - _setScalar("explode", explode, Boolean.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("contentType", "contentType", StringOverlay.factory); - _createMap("headers", "headers", StringOverlay.factory, null); - _createScalar("style", "style", StringOverlay.factory); - _createScalar("explode", "explode", BooleanOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return EncodingPropertyImpl.class; - } - - @Override - public JsonOverlay _create(EncodingProperty encodingProperty, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new EncodingPropertyImpl(encodingProperty, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new EncodingPropertyImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(EncodingProperty encodingProperty) { - return EncodingProperty.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return EncodingProperty.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public EncodingPropertyImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public EncodingPropertyImpl(EncodingProperty encodingProperty, JsonOverlay parent, ReferenceManager refMgr) { + super(encodingProperty, parent, factory, refMgr); + } + + // ContentType + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getContentType() { + return _get("contentType", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentType(String contentType) { + _setScalar("contentType", contentType, String.class); + } + + // Header + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders() { + return _getMap("headers", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders(boolean elaborate) { + return _getMap("headers", elaborate, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeaders() { + return _isPresent("headers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeader(String name) { + return _getMap("headers", String.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getHeader(String name) { + return _get("headers", name, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeaders(Map headers) { + _setMap("headers", headers, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeader(String name, String header) { + _set("headers", name, header, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeHeader(String name) { + _remove("headers", name, String.class); + } + + // Style + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getStyle() { + return _get("style", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setStyle(String style) { + _setScalar("style", style, String.class); + } + + // Explode + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getExplode() { + return _get("explode", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isExplode() { + Boolean bool = _get("explode", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExplode(Boolean explode) { + _setScalar("explode", explode, Boolean.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("contentType", "contentType", StringOverlay.factory); + _createMap("headers", "headers", StringOverlay.factory, null); + _createScalar("style", "style", StringOverlay.factory); + _createScalar("explode", "explode", BooleanOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return EncodingPropertyImpl.class; + } + + @Override + public JsonOverlay _create(EncodingProperty encodingProperty, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new EncodingPropertyImpl(encodingProperty, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new EncodingPropertyImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(EncodingProperty encodingProperty) { + return EncodingProperty.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return EncodingProperty.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExampleImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExampleImpl.java index d1104a60..95252773 100644 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExampleImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExampleImpl.java @@ -18,186 +18,186 @@ public class ExampleImpl extends PropertiesOverlay implements Example { - private Overlay overlay = Overlay.of(this); - - @Override - public String getName() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExampleImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExampleImpl(Example example, JsonOverlay parent, ReferenceManager refMgr) { - super(example, parent, factory, refMgr); - } - - // Summary - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getSummary() { - return _get("summary", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSummary(String summary) { - _setScalar("summary", summary, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Value - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getValue() { - return _get("value", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setValue(Object value) { - _setScalar("value", value, Object.class); - } - - // ExternalValue - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getExternalValue() { - return _get("externalValue", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExternalValue(String externalValue) { - _setScalar("externalValue", externalValue, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("summary", "summary", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("value", "value", ObjectOverlay.factory); - _createScalar("externalValue", "externalValue", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ExampleImpl.class; - } - - @Override - public JsonOverlay _create(Example example, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ExampleImpl(example, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ExampleImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Example example) { - return Example.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Example.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getName() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExampleImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExampleImpl(Example example, JsonOverlay parent, ReferenceManager refMgr) { + super(example, parent, factory, refMgr); + } + + // Summary + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getSummary() { + return _get("summary", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSummary(String summary) { + _setScalar("summary", summary, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Value + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getValue() { + return _get("value", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setValue(Object value) { + _setScalar("value", value, Object.class); + } + + // ExternalValue + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getExternalValue() { + return _get("externalValue", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExternalValue(String externalValue) { + _setScalar("externalValue", externalValue, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("summary", "summary", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("value", "value", ObjectOverlay.factory); + _createScalar("externalValue", "externalValue", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return ExampleImpl.class; + } + + @Override + public JsonOverlay _create(Example example, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ExampleImpl(example, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ExampleImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Example example) { + return Example.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Example.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExternalDocsImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExternalDocsImpl.java index f3d547fe..7052c8f1 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExternalDocsImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ExternalDocsImpl.java @@ -16,152 +16,152 @@ public class ExternalDocsImpl extends PropertiesOverlay implements ExternalDocs { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocsImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocsImpl(ExternalDocs externalDocs, JsonOverlay parent, ReferenceManager refMgr) { - super(externalDocs, parent, factory, refMgr); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Url - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getUrl() { - return _get("url", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setUrl(String url) { - _setScalar("url", url, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocsImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocsImpl(ExternalDocs externalDocs, JsonOverlay parent, ReferenceManager refMgr) { + super(externalDocs, parent, factory, refMgr); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Url + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getUrl() { + return _get("url", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setUrl(String url) { + _setScalar("url", url, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("url", "url", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); + protected Class> getOverlayClass() { + return ExternalDocsImpl.class; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); + public JsonOverlay _create(ExternalDocs externalDocs, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ExternalDocsImpl(externalDocs, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ExternalDocsImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("url", "url", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ExternalDocsImpl.class; - } - - @Override - public JsonOverlay _create(ExternalDocs externalDocs, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ExternalDocsImpl(externalDocs, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ExternalDocsImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(ExternalDocs externalDocs) { - return ExternalDocs.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return ExternalDocs.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(ExternalDocs externalDocs) { + return ExternalDocs.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return ExternalDocs.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/HeaderImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/HeaderImpl.java index 60b014fb..28dc3985 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/HeaderImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/HeaderImpl.java @@ -22,425 +22,425 @@ public class HeaderImpl extends PropertiesOverlay
implements Header { - private Overlay
overlay = Overlay.of(this); - - @Override - public String getKey() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public HeaderImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public HeaderImpl(Header header, JsonOverlay parent, ReferenceManager refMgr) { - super(header, parent, factory, refMgr); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // In - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getIn() { - return _get("in", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setIn(String in) { - _setScalar("in", in, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Required - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getRequired() { - return _get("required", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isRequired() { - Boolean bool = _get("required", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequired(Boolean required) { - _setScalar("required", required, Boolean.class); - } - - // Deprecated - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getDeprecated() { - return _get("deprecated", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isDeprecated() { - Boolean bool = _get("deprecated", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDeprecated(Boolean deprecated) { - _setScalar("deprecated", deprecated, Boolean.class); - } - - // AllowEmptyValue - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getAllowEmptyValue() { - return _get("allowEmptyValue", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isAllowEmptyValue() { - Boolean bool = _get("allowEmptyValue", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAllowEmptyValue(Boolean allowEmptyValue) { - _setScalar("allowEmptyValue", allowEmptyValue, Boolean.class); - } - - // Style - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getStyle() { - return _get("style", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setStyle(String style) { - _setScalar("style", style, String.class); - } - - // Explode - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getExplode() { - return _get("explode", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isExplode() { - Boolean bool = _get("explode", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExplode(Boolean explode) { - _setScalar("explode", explode, Boolean.class); - } - - // AllowReserved - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getAllowReserved() { - return _get("allowReserved", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isAllowReserved() { - Boolean bool = _get("allowReserved", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAllowReserved(Boolean allowReserved) { - _setScalar("allowReserved", allowReserved, Boolean.class); - } - - // Schema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema() { - return _get("schema", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema(boolean elaborate) { - return _get("schema", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSchema(Schema schema) { - _setScalar("schema", schema, Schema.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExample() { - return _get("example", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(Object example) { - _setScalar("example", example, Object.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples() { - return _getMap("examples", Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples(boolean elaborate) { - return _getMap("examples", elaborate, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExamples() { - return _isPresent("examples"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExample(String name) { - return _getMap("examples", Example.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Example getExample(String name) { - return _get("examples", name, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExamples(Map examples) { - _setMap("examples", examples, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(String name, Example example) { - _set("examples", name, example, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExample(String name) { - _remove("examples", name, Example.class); - } - - // ContentMediaType - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes() { - return _getMap("contentMediaTypes", MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes(boolean elaborate) { - return _getMap("contentMediaTypes", elaborate, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaTypes() { - return _isPresent("contentMediaTypes"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaType(String name) { - return _getMap("contentMediaTypes", MediaType.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public MediaType getContentMediaType(String name) { - return _get("contentMediaTypes", name, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaTypes(Map contentMediaTypes) { - _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaType(String name, MediaType contentMediaType) { - _set("contentMediaTypes", name, contentMediaType, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeContentMediaType(String name) { - _remove("contentMediaTypes", name, MediaType.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("in", "in", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("required", "required", BooleanOverlay.factory); - _createScalar("deprecated", "deprecated", BooleanOverlay.factory); - _createScalar("allowEmptyValue", "allowEmptyValue", BooleanOverlay.factory); - _createScalar("style", "style", StringOverlay.factory); - _createScalar("explode", "explode", BooleanOverlay.factory); - _createScalar("allowReserved", "allowReserved", BooleanOverlay.factory); - _createScalar("schema", "schema", SchemaImpl.factory); - _createScalar("example", "example", ObjectOverlay.factory); - _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory
factory = new OverlayFactory
() { - - @Override - protected Class> getOverlayClass() { - return HeaderImpl.class; - } - - @Override - public JsonOverlay
_create(Header header, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new HeaderImpl(header, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay
castOverlay = (JsonOverlay
) overlay; - return castOverlay; - } - - @Override - public JsonOverlay
_create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new HeaderImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay
castOverlay = (JsonOverlay
) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Header header) { - return Header.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Header.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay
overlay = Overlay.of(this); + + @Override + public String getKey() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public HeaderImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public HeaderImpl(Header header, JsonOverlay parent, ReferenceManager refMgr) { + super(header, parent, factory, refMgr); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // In + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getIn() { + return _get("in", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setIn(String in) { + _setScalar("in", in, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Required + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getRequired() { + return _get("required", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isRequired() { + Boolean bool = _get("required", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequired(Boolean required) { + _setScalar("required", required, Boolean.class); + } + + // Deprecated + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getDeprecated() { + return _get("deprecated", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isDeprecated() { + Boolean bool = _get("deprecated", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDeprecated(Boolean deprecated) { + _setScalar("deprecated", deprecated, Boolean.class); + } + + // AllowEmptyValue + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getAllowEmptyValue() { + return _get("allowEmptyValue", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isAllowEmptyValue() { + Boolean bool = _get("allowEmptyValue", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAllowEmptyValue(Boolean allowEmptyValue) { + _setScalar("allowEmptyValue", allowEmptyValue, Boolean.class); + } + + // Style + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getStyle() { + return _get("style", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setStyle(String style) { + _setScalar("style", style, String.class); + } + + // Explode + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getExplode() { + return _get("explode", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isExplode() { + Boolean bool = _get("explode", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExplode(Boolean explode) { + _setScalar("explode", explode, Boolean.class); + } + + // AllowReserved + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getAllowReserved() { + return _get("allowReserved", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isAllowReserved() { + Boolean bool = _get("allowReserved", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAllowReserved(Boolean allowReserved) { + _setScalar("allowReserved", allowReserved, Boolean.class); + } + + // Schema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema() { + return _get("schema", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema(boolean elaborate) { + return _get("schema", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSchema(Schema schema) { + _setScalar("schema", schema, Schema.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExample() { + return _get("example", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(Object example) { + _setScalar("example", example, Object.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples() { + return _getMap("examples", Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples(boolean elaborate) { + return _getMap("examples", elaborate, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExamples() { + return _isPresent("examples"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExample(String name) { + return _getMap("examples", Example.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Example getExample(String name) { + return _get("examples", name, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExamples(Map examples) { + _setMap("examples", examples, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(String name, Example example) { + _set("examples", name, example, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExample(String name) { + _remove("examples", name, Example.class); + } + + // ContentMediaType + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes() { + return _getMap("contentMediaTypes", MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes(boolean elaborate) { + return _getMap("contentMediaTypes", elaborate, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaTypes() { + return _isPresent("contentMediaTypes"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaType(String name) { + return _getMap("contentMediaTypes", MediaType.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public MediaType getContentMediaType(String name) { + return _get("contentMediaTypes", name, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaTypes(Map contentMediaTypes) { + _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaType(String name, MediaType contentMediaType) { + _set("contentMediaTypes", name, contentMediaType, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeContentMediaType(String name) { + _remove("contentMediaTypes", name, MediaType.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("in", "in", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("required", "required", BooleanOverlay.factory); + _createScalar("deprecated", "deprecated", BooleanOverlay.factory); + _createScalar("allowEmptyValue", "allowEmptyValue", BooleanOverlay.factory); + _createScalar("style", "style", StringOverlay.factory); + _createScalar("explode", "explode", BooleanOverlay.factory); + _createScalar("allowReserved", "allowReserved", BooleanOverlay.factory); + _createScalar("schema", "schema", SchemaImpl.factory); + _createScalar("example", "example", ObjectOverlay.factory); + _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory
factory = new OverlayFactory
() { + + @Override + protected Class> getOverlayClass() { + return HeaderImpl.class; + } + + @Override + public JsonOverlay
_create(Header header, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new HeaderImpl(header, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay
castOverlay = (JsonOverlay
) overlay; + return castOverlay; + } + + @Override + public JsonOverlay
_create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new HeaderImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay
castOverlay = (JsonOverlay
) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Header header) { + return Header.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Header.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/InfoImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/InfoImpl.java index a6451ce8..a30d0263 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/InfoImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/InfoImpl.java @@ -18,219 +18,219 @@ public class InfoImpl extends PropertiesOverlay implements Info { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public InfoImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public InfoImpl(Info info, JsonOverlay parent, ReferenceManager refMgr) { - super(info, parent, factory, refMgr); - } - - // Title - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getTitle() { - return _get("title", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTitle(String title) { - _setScalar("title", title, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // TermsOfService - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getTermsOfService() { - return _get("termsOfService", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTermsOfService(String termsOfService) { - _setScalar("termsOfService", termsOfService, String.class); - } - - // Contact - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Contact getContact() { - return _get("contact", Contact.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Contact getContact(boolean elaborate) { - return _get("contact", elaborate, Contact.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContact(Contact contact) { - _setScalar("contact", contact, Contact.class); - } - - // License - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public License getLicense() { - return _get("license", License.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public License getLicense(boolean elaborate) { - return _get("license", elaborate, License.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setLicense(License license) { - _setScalar("license", license, License.class); - } - - // Version - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getVersion() { - return _get("version", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setVersion(String version) { - _setScalar("version", version, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("title", "title", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("termsOfService", "termsOfService", StringOverlay.factory); - _createScalar("contact", "contact", ContactImpl.factory); - _createScalar("license", "license", LicenseImpl.factory); - _createScalar("version", "version", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return InfoImpl.class; - } - - @Override - public JsonOverlay _create(Info info, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new InfoImpl(info, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new InfoImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Info info) { - return Info.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Info.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public InfoImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public InfoImpl(Info info, JsonOverlay parent, ReferenceManager refMgr) { + super(info, parent, factory, refMgr); + } + + // Title + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getTitle() { + return _get("title", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTitle(String title) { + _setScalar("title", title, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // TermsOfService + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getTermsOfService() { + return _get("termsOfService", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTermsOfService(String termsOfService) { + _setScalar("termsOfService", termsOfService, String.class); + } + + // Contact + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Contact getContact() { + return _get("contact", Contact.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Contact getContact(boolean elaborate) { + return _get("contact", elaborate, Contact.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContact(Contact contact) { + _setScalar("contact", contact, Contact.class); + } + + // License + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public License getLicense() { + return _get("license", License.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public License getLicense(boolean elaborate) { + return _get("license", elaborate, License.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setLicense(License license) { + _setScalar("license", license, License.class); + } + + // Version + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getVersion() { + return _get("version", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setVersion(String version) { + _setScalar("version", version, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("title", "title", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("termsOfService", "termsOfService", StringOverlay.factory); + _createScalar("contact", "contact", ContactImpl.factory); + _createScalar("license", "license", LicenseImpl.factory); + _createScalar("version", "version", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return InfoImpl.class; + } + + @Override + public JsonOverlay _create(Info info, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new InfoImpl(info, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new InfoImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Info info) { + return Info.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Info.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LicenseImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LicenseImpl.java index 676794b0..235944e2 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LicenseImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LicenseImpl.java @@ -16,153 +16,153 @@ public class LicenseImpl extends PropertiesOverlay implements License { - JsonNode initJson = _jsonMissing(); - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public LicenseImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public LicenseImpl(License license, JsonOverlay parent, ReferenceManager refMgr) { - super(license, parent, factory, refMgr); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // Url - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getUrl() { - return _get("url", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setUrl(String url) { - _setScalar("url", url, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } + JsonNode initJson = _jsonMissing(); + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public LicenseImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public LicenseImpl(License license, JsonOverlay parent, ReferenceManager refMgr) { + super(license, parent, factory, refMgr); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // Url + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getUrl() { + return _get("url", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setUrl(String url) { + _setScalar("url", url, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("url", "url", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); + protected Class> getOverlayClass() { + return LicenseImpl.class; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); + public JsonOverlay _create(License license, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new LicenseImpl(license, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new LicenseImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("url", "url", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return LicenseImpl.class; - } - - @Override - public JsonOverlay _create(License license, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new LicenseImpl(license, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new LicenseImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(License license) { - return License.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return License.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(License license) { + return License.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return License.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LinkImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LinkImpl.java index b0106986..cc629c2b 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LinkImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/LinkImpl.java @@ -20,292 +20,292 @@ public class LinkImpl extends PropertiesOverlay implements Link { - private Overlay overlay = Overlay.of(this); - - @Override - public String getName() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public LinkImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public LinkImpl(Link link, JsonOverlay parent, ReferenceManager refMgr) { - super(link, parent, factory, refMgr); - } - - // OperationId - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getOperationId() { - return _get("operationId", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOperationId(String operationId) { - _setScalar("operationId", operationId, String.class); - } - - // OperationRef - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getOperationRef() { - return _get("operationRef", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOperationRef(String operationRef) { - _setScalar("operationRef", operationRef, String.class); - } - - // Parameter - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getParameters() { - return _getMap("parameters", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getParameters(boolean elaborate) { - return _getMap("parameters", elaborate, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameters() { - return _isPresent("parameters"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameter(String name) { - return _getMap("parameters", String.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getParameter(String name) { - return _get("parameters", name, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameters(Map parameters) { - _setMap("parameters", parameters, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameter(String name, String parameter) { - _set("parameters", name, parameter, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeParameter(String name) { - _remove("parameters", name, String.class); - } - - // Header - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders() { - return _getMap("headers", Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders(boolean elaborate) { - return _getMap("headers", elaborate, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeaders() { - return _isPresent("headers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeader(String name) { - return _getMap("headers", Header.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Header getHeader(String name) { - return _get("headers", name, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeaders(Map headers) { - _setMap("headers", headers, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeader(String name, Header header) { - _set("headers", name, header, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeHeader(String name) { - _remove("headers", name, Header.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Server - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Server getServer() { - return _get("server", Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Server getServer(boolean elaborate) { - return _get("server", elaborate, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServer(Server server) { - _setScalar("server", server, Server.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("operationId", "operationId", StringOverlay.factory); - _createScalar("operationRef", "operationRef", StringOverlay.factory); - _createMap("parameters", "parameters", StringOverlay.factory, null); - _createMap("headers", "headers", HeaderImpl.factory, null); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("server", "server", ServerImpl.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return LinkImpl.class; - } - - @Override - public JsonOverlay _create(Link link, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new LinkImpl(link, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new LinkImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Link link) { - return Link.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Link.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getName() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public LinkImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public LinkImpl(Link link, JsonOverlay parent, ReferenceManager refMgr) { + super(link, parent, factory, refMgr); + } + + // OperationId + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getOperationId() { + return _get("operationId", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOperationId(String operationId) { + _setScalar("operationId", operationId, String.class); + } + + // OperationRef + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getOperationRef() { + return _get("operationRef", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOperationRef(String operationRef) { + _setScalar("operationRef", operationRef, String.class); + } + + // Parameter + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getParameters() { + return _getMap("parameters", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getParameters(boolean elaborate) { + return _getMap("parameters", elaborate, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameters() { + return _isPresent("parameters"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameter(String name) { + return _getMap("parameters", String.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getParameter(String name) { + return _get("parameters", name, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameters(Map parameters) { + _setMap("parameters", parameters, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameter(String name, String parameter) { + _set("parameters", name, parameter, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeParameter(String name) { + _remove("parameters", name, String.class); + } + + // Header + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders() { + return _getMap("headers", Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders(boolean elaborate) { + return _getMap("headers", elaborate, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeaders() { + return _isPresent("headers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeader(String name) { + return _getMap("headers", Header.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Header getHeader(String name) { + return _get("headers", name, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeaders(Map headers) { + _setMap("headers", headers, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeader(String name, Header header) { + _set("headers", name, header, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeHeader(String name) { + _remove("headers", name, Header.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Server + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Server getServer() { + return _get("server", Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Server getServer(boolean elaborate) { + return _get("server", elaborate, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServer(Server server) { + _setScalar("server", server, Server.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("operationId", "operationId", StringOverlay.factory); + _createScalar("operationRef", "operationRef", StringOverlay.factory); + _createMap("parameters", "parameters", StringOverlay.factory, null); + _createMap("headers", "headers", HeaderImpl.factory, null); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("server", "server", ServerImpl.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return LinkImpl.class; + } + + @Override + public JsonOverlay _create(Link link, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new LinkImpl(link, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new LinkImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Link link) { + return Link.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Link.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/MediaTypeImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/MediaTypeImpl.java index 0c845056..c69f2fc8 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/MediaTypeImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/MediaTypeImpl.java @@ -18,257 +18,257 @@ public class MediaTypeImpl extends PropertiesOverlay implements MediaType { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public MediaTypeImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public MediaTypeImpl(MediaType mediaType, JsonOverlay parent, ReferenceManager refMgr) { - super(mediaType, parent, factory, refMgr); - } - - // Schema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema() { - return _get("schema", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema(boolean elaborate) { - return _get("schema", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSchema(Schema schema) { - _setScalar("schema", schema, Schema.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples() { - return _getMap("examples", Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples(boolean elaborate) { - return _getMap("examples", elaborate, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExamples() { - return _isPresent("examples"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExample(String name) { - return _getMap("examples", Example.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Example getExample(String name) { - return _get("examples", name, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExamples(Map examples) { - _setMap("examples", examples, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(String name, Example example) { - _set("examples", name, example, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExample(String name) { - _remove("examples", name, Example.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExample() { - return _get("example", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(Object example) { - _setScalar("example", example, Object.class); - } - - // EncodingProperty - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getEncodingProperties() { - return _getMap("encodingProperties", EncodingProperty.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getEncodingProperties(boolean elaborate) { - return _getMap("encodingProperties", elaborate, EncodingProperty.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasEncodingProperties() { - return _isPresent("encodingProperties"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasEncodingProperty(String name) { - return _getMap("encodingProperties", EncodingProperty.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public EncodingProperty getEncodingProperty(String name) { - return _get("encodingProperties", name, EncodingProperty.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEncodingProperties(Map encodingProperties) { - _setMap("encodingProperties", encodingProperties, EncodingProperty.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEncodingProperty(String name, EncodingProperty encodingProperty) { - _set("encodingProperties", name, encodingProperty, EncodingProperty.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeEncodingProperty(String name) { - _remove("encodingProperties", name, EncodingProperty.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("schema", "schema", SchemaImpl.factory); - _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createScalar("example", "example", ObjectOverlay.factory); - _createMap("encodingProperties", "encoding", EncodingPropertyImpl.factory, null); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return MediaTypeImpl.class; - } - - @Override - public JsonOverlay _create(MediaType mediaType, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new MediaTypeImpl(mediaType, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new MediaTypeImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(MediaType mediaType) { - return MediaType.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return MediaType.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public MediaTypeImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public MediaTypeImpl(MediaType mediaType, JsonOverlay parent, ReferenceManager refMgr) { + super(mediaType, parent, factory, refMgr); + } + + // Schema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema() { + return _get("schema", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema(boolean elaborate) { + return _get("schema", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSchema(Schema schema) { + _setScalar("schema", schema, Schema.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples() { + return _getMap("examples", Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples(boolean elaborate) { + return _getMap("examples", elaborate, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExamples() { + return _isPresent("examples"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExample(String name) { + return _getMap("examples", Example.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Example getExample(String name) { + return _get("examples", name, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExamples(Map examples) { + _setMap("examples", examples, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(String name, Example example) { + _set("examples", name, example, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExample(String name) { + _remove("examples", name, Example.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExample() { + return _get("example", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(Object example) { + _setScalar("example", example, Object.class); + } + + // EncodingProperty + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getEncodingProperties() { + return _getMap("encodingProperties", EncodingProperty.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getEncodingProperties(boolean elaborate) { + return _getMap("encodingProperties", elaborate, EncodingProperty.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasEncodingProperties() { + return _isPresent("encodingProperties"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasEncodingProperty(String name) { + return _getMap("encodingProperties", EncodingProperty.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public EncodingProperty getEncodingProperty(String name) { + return _get("encodingProperties", name, EncodingProperty.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEncodingProperties(Map encodingProperties) { + _setMap("encodingProperties", encodingProperties, EncodingProperty.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEncodingProperty(String name, EncodingProperty encodingProperty) { + _set("encodingProperties", name, encodingProperty, EncodingProperty.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeEncodingProperty(String name) { + _remove("encodingProperties", name, EncodingProperty.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("schema", "schema", SchemaImpl.factory); + _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createScalar("example", "example", ObjectOverlay.factory); + _createMap("encodingProperties", "encoding", EncodingPropertyImpl.factory, null); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return MediaTypeImpl.class; + } + + @Override + public JsonOverlay _create(MediaType mediaType, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new MediaTypeImpl(mediaType, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new MediaTypeImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(MediaType mediaType) { + return MediaType.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return MediaType.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OAuthFlowImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OAuthFlowImpl.java index 0b33576c..5f3d96ad 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OAuthFlowImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OAuthFlowImpl.java @@ -16,265 +16,265 @@ public class OAuthFlowImpl extends PropertiesOverlay implements OAuthFlow { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlowImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlowImpl(OAuthFlow oAuthFlow, JsonOverlay parent, ReferenceManager refMgr) { - super(oAuthFlow, parent, factory, refMgr); - } - - // AuthorizationUrl - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getAuthorizationUrl() { - return _get("authorizationUrl", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAuthorizationUrl(String authorizationUrl) { - _setScalar("authorizationUrl", authorizationUrl, String.class); - } - - // TokenUrl - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getTokenUrl() { - return _get("tokenUrl", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTokenUrl(String tokenUrl) { - _setScalar("tokenUrl", tokenUrl, String.class); - } - - // RefreshUrl - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getRefreshUrl() { - return _get("refreshUrl", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRefreshUrl(String refreshUrl) { - _setScalar("refreshUrl", refreshUrl, String.class); - } - - // Scope - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getScopes() { - return _getMap("scopes", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getScopes(boolean elaborate) { - return _getMap("scopes", elaborate, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasScopes() { - return _isPresent("scopes"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasScope(String name) { - return _getMap("scopes", String.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getScope(String name) { - return _get("scopes", name, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setScopes(Map scopes) { - _setMap("scopes", scopes, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setScope(String name, String scope) { - _set("scopes", name, scope, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeScope(String name) { - _remove("scopes", name, String.class); - } - - // ScopesExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getScopesExtensions() { - return _getMap("scopesExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getScopesExtensions(boolean elaborate) { - return _getMap("scopesExtensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasScopesExtensions() { - return _isPresent("scopesExtensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasScopesExtension(String name) { - return _getMap("scopesExtensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getScopesExtension(String name) { - return _get("scopesExtensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setScopesExtensions(Map scopesExtensions) { - _setMap("scopesExtensions", scopesExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setScopesExtension(String name, Object scopesExtension) { - _set("scopesExtensions", name, scopesExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeScopesExtension(String name) { - _remove("scopesExtensions", name, Object.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("authorizationUrl", "authorizationUrl", StringOverlay.factory); - _createScalar("tokenUrl", "tokenUrl", StringOverlay.factory); - _createScalar("refreshUrl", "refreshUrl", StringOverlay.factory); - _createMap("scopes", "scopes", StringOverlay.factory, "(?!x-).*"); - _createMap("scopesExtensions", "scopes", ObjectOverlay.factory, "x-.+"); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return OAuthFlowImpl.class; - } - - @Override - public JsonOverlay _create(OAuthFlow oAuthFlow, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new OAuthFlowImpl(oAuthFlow, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new OAuthFlowImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(OAuthFlow oAuthFlow) { - return OAuthFlow.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return OAuthFlow.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlowImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlowImpl(OAuthFlow oAuthFlow, JsonOverlay parent, ReferenceManager refMgr) { + super(oAuthFlow, parent, factory, refMgr); + } + + // AuthorizationUrl + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getAuthorizationUrl() { + return _get("authorizationUrl", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAuthorizationUrl(String authorizationUrl) { + _setScalar("authorizationUrl", authorizationUrl, String.class); + } + + // TokenUrl + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getTokenUrl() { + return _get("tokenUrl", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTokenUrl(String tokenUrl) { + _setScalar("tokenUrl", tokenUrl, String.class); + } + + // RefreshUrl + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getRefreshUrl() { + return _get("refreshUrl", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRefreshUrl(String refreshUrl) { + _setScalar("refreshUrl", refreshUrl, String.class); + } + + // Scope + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getScopes() { + return _getMap("scopes", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getScopes(boolean elaborate) { + return _getMap("scopes", elaborate, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasScopes() { + return _isPresent("scopes"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasScope(String name) { + return _getMap("scopes", String.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getScope(String name) { + return _get("scopes", name, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setScopes(Map scopes) { + _setMap("scopes", scopes, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setScope(String name, String scope) { + _set("scopes", name, scope, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeScope(String name) { + _remove("scopes", name, String.class); + } + + // ScopesExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getScopesExtensions() { + return _getMap("scopesExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getScopesExtensions(boolean elaborate) { + return _getMap("scopesExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasScopesExtensions() { + return _isPresent("scopesExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasScopesExtension(String name) { + return _getMap("scopesExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getScopesExtension(String name) { + return _get("scopesExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setScopesExtensions(Map scopesExtensions) { + _setMap("scopesExtensions", scopesExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setScopesExtension(String name, Object scopesExtension) { + _set("scopesExtensions", name, scopesExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeScopesExtension(String name) { + _remove("scopesExtensions", name, Object.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("authorizationUrl", "authorizationUrl", StringOverlay.factory); + _createScalar("tokenUrl", "tokenUrl", StringOverlay.factory); + _createScalar("refreshUrl", "refreshUrl", StringOverlay.factory); + _createMap("scopes", "scopes", StringOverlay.factory, "(?!x-).*"); + _createMap("scopesExtensions", "scopes", ObjectOverlay.factory, "x-.+"); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return OAuthFlowImpl.class; + } + + @Override + public JsonOverlay _create(OAuthFlow oAuthFlow, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new OAuthFlowImpl(oAuthFlow, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new OAuthFlowImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(OAuthFlow oAuthFlow) { + return OAuthFlow.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return OAuthFlow.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OpenApi3Impl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OpenApi3Impl.java index b01662c3..a51a148f 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OpenApi3Impl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OpenApi3Impl.java @@ -37,987 +37,987 @@ public class OpenApi3Impl extends PropertiesOverlay implements OpenApi3 { - private ValidationResults validationResults = null; - - @Override - protected JsonNode _fixJson(JsonNode json) { - if (json.isMissingNode()) { - json = _jsonObject(); - } - if (!json.has("paths")) { - ((ObjectNode) json).putObject("paths"); - } - return json; - } - - @Inject - private Validator validator; - - @Override - public void validate() { - validationResults = validator.validate(this); - } - - @Override - public boolean isValid() { - if (validationResults == null) { - validate(); - } - return validationResults.getSeverity().lt(Severity.ERROR); - } - - @Override - public ValidationResults getValidationResults() { - if (validationResults == null) { - validate(); - } - return validationResults; - } - - @Override - public Collection getValidationItems() { - return getValidationResults().getItems(); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OpenApi3Impl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OpenApi3Impl(OpenApi3 openApi3, JsonOverlay parent, ReferenceManager refMgr) { - super(openApi3, parent, factory, refMgr); - } - - // OpenApi - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getOpenApi() { - return _get("openApi", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOpenApi(String openApi) { - _setScalar("openApi", openApi, String.class); - } - - // Info - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Info getInfo() { - return _get("info", Info.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Info getInfo(boolean elaborate) { - return _get("info", elaborate, Info.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setInfo(Info info) { - _setScalar("info", info, Info.class); - } - - // Server - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getServers() { - return _getList("servers", Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getServers(boolean elaborate) { - return _getList("servers", elaborate, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasServers() { - return _isPresent("servers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Server getServer(int index) { - return _get("servers", index, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServers(List servers) { - _setList("servers", servers, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServer(int index, Server server) { - _set("servers", index, server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addServer(Server server) { - _add("servers", server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertServer(int index, Server server) { - _insert("servers", index, server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeServer(int index) { - _remove("servers", index, Server.class); - } - - // Path - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getPaths() { - return _getMap("paths", Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getPaths(boolean elaborate) { - return _getMap("paths", elaborate, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasPaths() { - return _isPresent("paths"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasPath(String name) { - return _getMap("paths", Path.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Path getPath(String name) { - return _get("paths", name, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPaths(Map paths) { - _setMap("paths", paths, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPath(String name, Path path) { - _set("paths", name, path, Path.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removePath(String name) { - _remove("paths", name, Path.class); - } - - // PathsExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getPathsExtensions() { - return _getMap("pathsExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getPathsExtensions(boolean elaborate) { - return _getMap("pathsExtensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasPathsExtensions() { - return _isPresent("pathsExtensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasPathsExtension(String name) { - return _getMap("pathsExtensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getPathsExtension(String name) { - return _get("pathsExtensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPathsExtensions(Map pathsExtensions) { - _setMap("pathsExtensions", pathsExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPathsExtension(String name, Object pathsExtension) { - _set("pathsExtensions", name, pathsExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removePathsExtension(String name) { - _remove("pathsExtensions", name, Object.class); - } - - // Schema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getSchemas() { - return _getMap("schemas", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getSchemas(boolean elaborate) { - return _getMap("schemas", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasSchemas() { - return _isPresent("schemas"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasSchema(String name) { - return _getMap("schemas", Schema.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema(String name) { - return _get("schemas", name, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSchemas(Map schemas) { - _setMap("schemas", schemas, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSchema(String name, Schema schema) { - _set("schemas", name, schema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeSchema(String name) { - _remove("schemas", name, Schema.class); - } - - // Response - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getResponses() { - return _getMap("responses", Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getResponses(boolean elaborate) { - return _getMap("responses", elaborate, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasResponses() { - return _isPresent("responses"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasResponse(String name) { - return _getMap("responses", Response.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Response getResponse(String name) { - return _get("responses", name, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setResponses(Map responses) { - _setMap("responses", responses, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setResponse(String name, Response response) { - _set("responses", name, response, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeResponse(String name) { - _remove("responses", name, Response.class); - } - - // Parameter - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getParameters() { - return _getMap("parameters", Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getParameters(boolean elaborate) { - return _getMap("parameters", elaborate, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameters() { - return _isPresent("parameters"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameter(String name) { - return _getMap("parameters", Parameter.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Parameter getParameter(String name) { - return _get("parameters", name, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameters(Map parameters) { - _setMap("parameters", parameters, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameter(String name, Parameter parameter) { - _set("parameters", name, parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeParameter(String name) { - _remove("parameters", name, Parameter.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples() { - return _getMap("examples", Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples(boolean elaborate) { - return _getMap("examples", elaborate, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExamples() { - return _isPresent("examples"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExample(String name) { - return _getMap("examples", Example.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Example getExample(String name) { - return _get("examples", name, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExamples(Map examples) { - _setMap("examples", examples, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(String name, Example example) { - _set("examples", name, example, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExample(String name) { - _remove("examples", name, Example.class); - } - - // RequestBody - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getRequestBodies() { - return _getMap("requestBodies", RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getRequestBodies(boolean elaborate) { - return _getMap("requestBodies", elaborate, RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasRequestBodies() { - return _isPresent("requestBodies"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasRequestBody(String name) { - return _getMap("requestBodies", RequestBody.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public RequestBody getRequestBody(String name) { - return _get("requestBodies", name, RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequestBodies(Map requestBodies) { - _setMap("requestBodies", requestBodies, RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequestBody(String name, RequestBody requestBody) { - _set("requestBodies", name, requestBody, RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeRequestBody(String name) { - _remove("requestBodies", name, RequestBody.class); - } - - // Header - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders() { - return _getMap("headers", Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders(boolean elaborate) { - return _getMap("headers", elaborate, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeaders() { - return _isPresent("headers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeader(String name) { - return _getMap("headers", Header.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Header getHeader(String name) { - return _get("headers", name, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeaders(Map headers) { - _setMap("headers", headers, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeader(String name, Header header) { - _set("headers", name, header, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeHeader(String name) { - _remove("headers", name, Header.class); - } - - // SecurityScheme - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getSecuritySchemes() { - return _getMap("securitySchemes", SecurityScheme.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getSecuritySchemes(boolean elaborate) { - return _getMap("securitySchemes", elaborate, SecurityScheme.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasSecuritySchemes() { - return _isPresent("securitySchemes"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasSecurityScheme(String name) { - return _getMap("securitySchemes", SecurityScheme.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityScheme getSecurityScheme(String name) { - return _get("securitySchemes", name, SecurityScheme.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSecuritySchemes(Map securitySchemes) { - _setMap("securitySchemes", securitySchemes, SecurityScheme.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSecurityScheme(String name, SecurityScheme securityScheme) { - _set("securitySchemes", name, securityScheme, SecurityScheme.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeSecurityScheme(String name) { - _remove("securitySchemes", name, SecurityScheme.class); - } - - // Link - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getLinks() { - return _getMap("links", Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getLinks(boolean elaborate) { - return _getMap("links", elaborate, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasLinks() { - return _isPresent("links"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasLink(String name) { - return _getMap("links", Link.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Link getLink(String name) { - return _get("links", name, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setLinks(Map links) { - _setMap("links", links, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setLink(String name, Link link) { - _set("links", name, link, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeLink(String name) { - _remove("links", name, Link.class); - } - - // Callback - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbacks() { - return _getMap("callbacks", Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbacks(boolean elaborate) { - return _getMap("callbacks", elaborate, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallbacks() { - return _isPresent("callbacks"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallback(String name) { - return _getMap("callbacks", Callback.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Callback getCallback(String name) { - return _get("callbacks", name, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallbacks(Map callbacks) { - _setMap("callbacks", callbacks, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallback(String name, Callback callback) { - _set("callbacks", name, callback, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeCallback(String name) { - _remove("callbacks", name, Callback.class); - } - - // ComponentsExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getComponentsExtensions() { - return _getMap("componentsExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getComponentsExtensions(boolean elaborate) { - return _getMap("componentsExtensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasComponentsExtensions() { - return _isPresent("componentsExtensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasComponentsExtension(String name) { - return _getMap("componentsExtensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getComponentsExtension(String name) { - return _get("componentsExtensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setComponentsExtensions(Map componentsExtensions) { - _setMap("componentsExtensions", componentsExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setComponentsExtension(String name, Object componentsExtension) { - _set("componentsExtensions", name, componentsExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeComponentsExtension(String name) { - _remove("componentsExtensions", name, Object.class); - } - - // SecurityRequirement - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getSecurityRequirements() { - return _getList("securityRequirements", SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getSecurityRequirements(boolean elaborate) { - return _getList("securityRequirements", elaborate, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasSecurityRequirements() { - return _isPresent("securityRequirements"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityRequirement getSecurityRequirement(int index) { - return _get("securityRequirements", index, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSecurityRequirements(List securityRequirements) { - _setList("securityRequirements", securityRequirements, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSecurityRequirement(int index, SecurityRequirement securityRequirement) { - _set("securityRequirements", index, securityRequirement, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addSecurityRequirement(SecurityRequirement securityRequirement) { - _add("securityRequirements", securityRequirement, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertSecurityRequirement(int index, SecurityRequirement securityRequirement) { - _insert("securityRequirements", index, securityRequirement, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeSecurityRequirement(int index) { - _remove("securityRequirements", index, SecurityRequirement.class); - } - - // Tag - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getTags() { - return _getList("tags", Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getTags(boolean elaborate) { - return _getList("tags", elaborate, Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasTags() { - return _isPresent("tags"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Tag getTag(int index) { - return _get("tags", index, Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTags(List tags) { - _setList("tags", tags, Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTag(int index, Tag tag) { - _set("tags", index, tag, Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addTag(Tag tag) { - _add("tags", tag, Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertTag(int index, Tag tag) { - _insert("tags", index, tag, Tag.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeTag(int index) { - _remove("tags", index, Tag.class); - } - - // ExternalDocs - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs() { - return _get("externalDocs", ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs(boolean elaborate) { - return _get("externalDocs", elaborate, ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExternalDocs(ExternalDocs externalDocs) { - _setScalar("externalDocs", externalDocs, ExternalDocs.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("openApi", "openapi", StringOverlay.factory); - _createScalar("info", "info", InfoImpl.factory); - _createList("servers", "servers", ServerImpl.factory); - _createMap("paths", "paths", PathImpl.factory, "/.*"); - _createMap("pathsExtensions", "paths", ObjectOverlay.factory, "x-.+"); - _createMap("schemas", "components/schemas", SchemaImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("responses", "components/responses", ResponseImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("parameters", "components/parameters", ParameterImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("examples", "components/examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("requestBodies", "components/requestBodies", RequestBodyImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("headers", "components/headers", HeaderImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("securitySchemes", "components/securitySchemes", SecuritySchemeImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("links", "components/links", LinkImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("callbacks", "components/callbacks", CallbackImpl.factory, "(?!x-)[a-zA-Z0-9\\._-]+"); - _createMap("componentsExtensions", "components", ObjectOverlay.factory, "x-.+"); - _createList("securityRequirements", "security", SecurityRequirementImpl.factory); - _createList("tags", "tags", TagImpl.factory); - _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return OpenApi3Impl.class; - } - - @Override - public JsonOverlay _create(OpenApi3 openApi3, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new OpenApi3Impl(openApi3, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new OpenApi3Impl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(OpenApi3 openApi3) { - return OpenApi3.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private ValidationResults validationResults = null; + + @Override + protected JsonNode _fixJson(JsonNode json) { + if (json.isMissingNode()) { + json = _jsonObject(); + } + if (!json.has("paths")) { + ((ObjectNode) json).putObject("paths"); + } + return json; + } + + @Inject + private Validator validator; + + @Override + public void validate() { + validationResults = validator.validate(this); + } + + @Override + public boolean isValid() { + if (validationResults == null) { + validate(); + } + return validationResults.getSeverity().lt(Severity.ERROR); + } + + @Override + public ValidationResults getValidationResults() { + if (validationResults == null) { + validate(); + } + return validationResults; + } + + @Override + public Collection getValidationItems() { + return getValidationResults().getItems(); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OpenApi3Impl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OpenApi3Impl(OpenApi3 openApi3, JsonOverlay parent, ReferenceManager refMgr) { + super(openApi3, parent, factory, refMgr); + } + + // OpenApi + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getOpenApi() { + return _get("openApi", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOpenApi(String openApi) { + _setScalar("openApi", openApi, String.class); + } + + // Info + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Info getInfo() { + return _get("info", Info.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Info getInfo(boolean elaborate) { + return _get("info", elaborate, Info.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setInfo(Info info) { + _setScalar("info", info, Info.class); + } + + // Server + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getServers() { + return _getList("servers", Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getServers(boolean elaborate) { + return _getList("servers", elaborate, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasServers() { + return _isPresent("servers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Server getServer(int index) { + return _get("servers", index, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServers(List servers) { + _setList("servers", servers, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServer(int index, Server server) { + _set("servers", index, server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addServer(Server server) { + _add("servers", server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertServer(int index, Server server) { + _insert("servers", index, server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeServer(int index) { + _remove("servers", index, Server.class); + } + + // Path + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getPaths() { + return _getMap("paths", Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getPaths(boolean elaborate) { + return _getMap("paths", elaborate, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasPaths() { + return _isPresent("paths"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasPath(String name) { + return _getMap("paths", Path.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Path getPath(String name) { + return _get("paths", name, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPaths(Map paths) { + _setMap("paths", paths, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPath(String name, Path path) { + _set("paths", name, path, Path.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removePath(String name) { + _remove("paths", name, Path.class); + } + + // PathsExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getPathsExtensions() { + return _getMap("pathsExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getPathsExtensions(boolean elaborate) { + return _getMap("pathsExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasPathsExtensions() { + return _isPresent("pathsExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasPathsExtension(String name) { + return _getMap("pathsExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getPathsExtension(String name) { + return _get("pathsExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPathsExtensions(Map pathsExtensions) { + _setMap("pathsExtensions", pathsExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPathsExtension(String name, Object pathsExtension) { + _set("pathsExtensions", name, pathsExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removePathsExtension(String name) { + _remove("pathsExtensions", name, Object.class); + } + + // Schema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getSchemas() { + return _getMap("schemas", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getSchemas(boolean elaborate) { + return _getMap("schemas", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasSchemas() { + return _isPresent("schemas"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasSchema(String name) { + return _getMap("schemas", Schema.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema(String name) { + return _get("schemas", name, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSchemas(Map schemas) { + _setMap("schemas", schemas, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSchema(String name, Schema schema) { + _set("schemas", name, schema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeSchema(String name) { + _remove("schemas", name, Schema.class); + } + + // Response + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getResponses() { + return _getMap("responses", Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getResponses(boolean elaborate) { + return _getMap("responses", elaborate, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasResponses() { + return _isPresent("responses"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasResponse(String name) { + return _getMap("responses", Response.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Response getResponse(String name) { + return _get("responses", name, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setResponses(Map responses) { + _setMap("responses", responses, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setResponse(String name, Response response) { + _set("responses", name, response, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeResponse(String name) { + _remove("responses", name, Response.class); + } + + // Parameter + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getParameters() { + return _getMap("parameters", Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getParameters(boolean elaborate) { + return _getMap("parameters", elaborate, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameters() { + return _isPresent("parameters"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameter(String name) { + return _getMap("parameters", Parameter.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Parameter getParameter(String name) { + return _get("parameters", name, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameters(Map parameters) { + _setMap("parameters", parameters, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameter(String name, Parameter parameter) { + _set("parameters", name, parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeParameter(String name) { + _remove("parameters", name, Parameter.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples() { + return _getMap("examples", Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples(boolean elaborate) { + return _getMap("examples", elaborate, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExamples() { + return _isPresent("examples"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExample(String name) { + return _getMap("examples", Example.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Example getExample(String name) { + return _get("examples", name, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExamples(Map examples) { + _setMap("examples", examples, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(String name, Example example) { + _set("examples", name, example, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExample(String name) { + _remove("examples", name, Example.class); + } + + // RequestBody + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getRequestBodies() { + return _getMap("requestBodies", RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getRequestBodies(boolean elaborate) { + return _getMap("requestBodies", elaborate, RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasRequestBodies() { + return _isPresent("requestBodies"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasRequestBody(String name) { + return _getMap("requestBodies", RequestBody.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public RequestBody getRequestBody(String name) { + return _get("requestBodies", name, RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequestBodies(Map requestBodies) { + _setMap("requestBodies", requestBodies, RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequestBody(String name, RequestBody requestBody) { + _set("requestBodies", name, requestBody, RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeRequestBody(String name) { + _remove("requestBodies", name, RequestBody.class); + } + + // Header + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders() { + return _getMap("headers", Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders(boolean elaborate) { + return _getMap("headers", elaborate, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeaders() { + return _isPresent("headers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeader(String name) { + return _getMap("headers", Header.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Header getHeader(String name) { + return _get("headers", name, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeaders(Map headers) { + _setMap("headers", headers, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeader(String name, Header header) { + _set("headers", name, header, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeHeader(String name) { + _remove("headers", name, Header.class); + } + + // SecurityScheme + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getSecuritySchemes() { + return _getMap("securitySchemes", SecurityScheme.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getSecuritySchemes(boolean elaborate) { + return _getMap("securitySchemes", elaborate, SecurityScheme.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasSecuritySchemes() { + return _isPresent("securitySchemes"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasSecurityScheme(String name) { + return _getMap("securitySchemes", SecurityScheme.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityScheme getSecurityScheme(String name) { + return _get("securitySchemes", name, SecurityScheme.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSecuritySchemes(Map securitySchemes) { + _setMap("securitySchemes", securitySchemes, SecurityScheme.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSecurityScheme(String name, SecurityScheme securityScheme) { + _set("securitySchemes", name, securityScheme, SecurityScheme.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeSecurityScheme(String name) { + _remove("securitySchemes", name, SecurityScheme.class); + } + + // Link + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getLinks() { + return _getMap("links", Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getLinks(boolean elaborate) { + return _getMap("links", elaborate, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasLinks() { + return _isPresent("links"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasLink(String name) { + return _getMap("links", Link.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Link getLink(String name) { + return _get("links", name, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setLinks(Map links) { + _setMap("links", links, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setLink(String name, Link link) { + _set("links", name, link, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeLink(String name) { + _remove("links", name, Link.class); + } + + // Callback + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbacks() { + return _getMap("callbacks", Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbacks(boolean elaborate) { + return _getMap("callbacks", elaborate, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallbacks() { + return _isPresent("callbacks"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallback(String name) { + return _getMap("callbacks", Callback.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Callback getCallback(String name) { + return _get("callbacks", name, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallbacks(Map callbacks) { + _setMap("callbacks", callbacks, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallback(String name, Callback callback) { + _set("callbacks", name, callback, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeCallback(String name) { + _remove("callbacks", name, Callback.class); + } + + // ComponentsExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getComponentsExtensions() { + return _getMap("componentsExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getComponentsExtensions(boolean elaborate) { + return _getMap("componentsExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasComponentsExtensions() { + return _isPresent("componentsExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasComponentsExtension(String name) { + return _getMap("componentsExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getComponentsExtension(String name) { + return _get("componentsExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setComponentsExtensions(Map componentsExtensions) { + _setMap("componentsExtensions", componentsExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setComponentsExtension(String name, Object componentsExtension) { + _set("componentsExtensions", name, componentsExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeComponentsExtension(String name) { + _remove("componentsExtensions", name, Object.class); + } + + // SecurityRequirement + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getSecurityRequirements() { + return _getList("securityRequirements", SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getSecurityRequirements(boolean elaborate) { + return _getList("securityRequirements", elaborate, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasSecurityRequirements() { + return _isPresent("securityRequirements"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityRequirement getSecurityRequirement(int index) { + return _get("securityRequirements", index, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSecurityRequirements(List securityRequirements) { + _setList("securityRequirements", securityRequirements, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSecurityRequirement(int index, SecurityRequirement securityRequirement) { + _set("securityRequirements", index, securityRequirement, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addSecurityRequirement(SecurityRequirement securityRequirement) { + _add("securityRequirements", securityRequirement, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertSecurityRequirement(int index, SecurityRequirement securityRequirement) { + _insert("securityRequirements", index, securityRequirement, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeSecurityRequirement(int index) { + _remove("securityRequirements", index, SecurityRequirement.class); + } + + // Tag + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getTags() { + return _getList("tags", Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getTags(boolean elaborate) { + return _getList("tags", elaborate, Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasTags() { + return _isPresent("tags"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Tag getTag(int index) { + return _get("tags", index, Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTags(List tags) { + _setList("tags", tags, Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTag(int index, Tag tag) { + _set("tags", index, tag, Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addTag(Tag tag) { + _add("tags", tag, Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertTag(int index, Tag tag) { + _insert("tags", index, tag, Tag.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeTag(int index) { + _remove("tags", index, Tag.class); + } + + // ExternalDocs + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs() { + return _get("externalDocs", ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs(boolean elaborate) { + return _get("externalDocs", elaborate, ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExternalDocs(ExternalDocs externalDocs) { + _setScalar("externalDocs", externalDocs, ExternalDocs.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("openApi", "openapi", StringOverlay.factory); + _createScalar("info", "info", InfoImpl.factory); + _createList("servers", "servers", ServerImpl.factory); + _createMap("paths", "paths", PathImpl.factory, "/.*"); + _createMap("pathsExtensions", "paths", ObjectOverlay.factory, "x-.+"); + _createMap("schemas", "components/schemas", SchemaImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("responses", "components/responses", ResponseImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("parameters", "components/parameters", ParameterImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("examples", "components/examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("requestBodies", "components/requestBodies", RequestBodyImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("headers", "components/headers", HeaderImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("securitySchemes", "components/securitySchemes", SecuritySchemeImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("links", "components/links", LinkImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("callbacks", "components/callbacks", CallbackImpl.factory, "(?!x-)[a-zA-Z0-9\\._-]+"); + _createMap("componentsExtensions", "components", ObjectOverlay.factory, "x-.+"); + _createList("securityRequirements", "security", SecurityRequirementImpl.factory); + _createList("tags", "tags", TagImpl.factory); + _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return OpenApi3Impl.class; + } + + @Override + public JsonOverlay _create(OpenApi3 openApi3, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new OpenApi3Impl(openApi3, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new OpenApi3Impl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(OpenApi3 openApi3) { + return OpenApi3.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OperationImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OperationImpl.java index a6836b97..7fb99869 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OperationImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/OperationImpl.java @@ -25,650 +25,650 @@ public class OperationImpl extends PropertiesOverlay implements Operation { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OperationImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OperationImpl(Operation operation, JsonOverlay parent, ReferenceManager refMgr) { - super(operation, parent, factory, refMgr); - } - - // Tag - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getTags() { - return _getList("tags", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getTags(boolean elaborate) { - return _getList("tags", elaborate, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasTags() { - return _isPresent("tags"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getTag(int index) { - return _get("tags", index, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTags(List tags) { - _setList("tags", tags, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTag(int index, String tag) { - _set("tags", index, tag, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addTag(String tag) { - _add("tags", tag, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertTag(int index, String tag) { - _insert("tags", index, tag, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeTag(int index) { - _remove("tags", index, String.class); - } - - // Summary - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getSummary() { - return _get("summary", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSummary(String summary) { - _setScalar("summary", summary, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // ExternalDocs - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs() { - return _get("externalDocs", ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs(boolean elaborate) { - return _get("externalDocs", elaborate, ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExternalDocs(ExternalDocs externalDocs) { - _setScalar("externalDocs", externalDocs, ExternalDocs.class); - } - - // OperationId - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getOperationId() { - return _get("operationId", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOperationId(String operationId) { - _setScalar("operationId", operationId, String.class); - } - - // Parameter - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getParameters() { - return _getList("parameters", Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getParameters(boolean elaborate) { - return _getList("parameters", elaborate, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameters() { - return _isPresent("parameters"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Parameter getParameter(int index) { - return _get("parameters", index, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameters(List parameters) { - _setList("parameters", parameters, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameter(int index, Parameter parameter) { - _set("parameters", index, parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addParameter(Parameter parameter) { - _add("parameters", parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertParameter(int index, Parameter parameter) { - _insert("parameters", index, parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeParameter(int index) { - _remove("parameters", index, Parameter.class); - } - - // RequestBody - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public RequestBody getRequestBody() { - return _get("requestBody", RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public RequestBody getRequestBody(boolean elaborate) { - return _get("requestBody", elaborate, RequestBody.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequestBody(RequestBody requestBody) { - _setScalar("requestBody", requestBody, RequestBody.class); - } - - // Response - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getResponses() { - return _getMap("responses", Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getResponses(boolean elaborate) { - return _getMap("responses", elaborate, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasResponses() { - return _isPresent("responses"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasResponse(String name) { - return _getMap("responses", Response.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Response getResponse(String name) { - return _get("responses", name, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setResponses(Map responses) { - _setMap("responses", responses, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setResponse(String name, Response response) { - _set("responses", name, response, Response.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeResponse(String name) { - _remove("responses", name, Response.class); - } - - // ResponsesExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getResponsesExtensions() { - return _getMap("responsesExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getResponsesExtensions(boolean elaborate) { - return _getMap("responsesExtensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasResponsesExtensions() { - return _isPresent("responsesExtensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasResponsesExtension(String name) { - return _getMap("responsesExtensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getResponsesExtension(String name) { - return _get("responsesExtensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setResponsesExtensions(Map responsesExtensions) { - _setMap("responsesExtensions", responsesExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setResponsesExtension(String name, Object responsesExtension) { - _set("responsesExtensions", name, responsesExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeResponsesExtension(String name) { - _remove("responsesExtensions", name, Object.class); - } - - // Callback - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbacks() { - return _getMap("callbacks", Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbacks(boolean elaborate) { - return _getMap("callbacks", elaborate, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallbacks() { - return _isPresent("callbacks"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallback(String name) { - return _getMap("callbacks", Callback.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Callback getCallback(String name) { - return _get("callbacks", name, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallbacks(Map callbacks) { - _setMap("callbacks", callbacks, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallback(String name, Callback callback) { - _set("callbacks", name, callback, Callback.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeCallback(String name) { - _remove("callbacks", name, Callback.class); - } - - // CallbacksExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbacksExtensions() { - return _getMap("callbacksExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getCallbacksExtensions(boolean elaborate) { - return _getMap("callbacksExtensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallbacksExtensions() { - return _isPresent("callbacksExtensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasCallbacksExtension(String name) { - return _getMap("callbacksExtensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getCallbacksExtension(String name) { - return _get("callbacksExtensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallbacksExtensions(Map callbacksExtensions) { - _setMap("callbacksExtensions", callbacksExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setCallbacksExtension(String name, Object callbacksExtension) { - _set("callbacksExtensions", name, callbacksExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeCallbacksExtension(String name) { - _remove("callbacksExtensions", name, Object.class); - } - - // Deprecated - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getDeprecated() { - return _get("deprecated", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isDeprecated() { - Boolean bool = _get("deprecated", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDeprecated(Boolean deprecated) { - _setScalar("deprecated", deprecated, Boolean.class); - } - - // SecurityRequirement - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getSecurityRequirements() { - return _getList("securityRequirements", SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getSecurityRequirements(boolean elaborate) { - return _getList("securityRequirements", elaborate, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasSecurityRequirements() { - return _isPresent("securityRequirements"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityRequirement getSecurityRequirement(int index) { - return _get("securityRequirements", index, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSecurityRequirements(List securityRequirements) { - _setList("securityRequirements", securityRequirements, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSecurityRequirement(int index, SecurityRequirement securityRequirement) { - _set("securityRequirements", index, securityRequirement, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addSecurityRequirement(SecurityRequirement securityRequirement) { - _add("securityRequirements", securityRequirement, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertSecurityRequirement(int index, SecurityRequirement securityRequirement) { - _insert("securityRequirements", index, securityRequirement, SecurityRequirement.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeSecurityRequirement(int index) { - _remove("securityRequirements", index, SecurityRequirement.class); - } - - // Server - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getServers() { - return _getList("servers", Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getServers(boolean elaborate) { - return _getList("servers", elaborate, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasServers() { - return _isPresent("servers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Server getServer(int index) { - return _get("servers", index, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServers(List servers) { - _setList("servers", servers, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServer(int index, Server server) { - _set("servers", index, server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addServer(Server server) { - _add("servers", server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertServer(int index, Server server) { - _insert("servers", index, server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeServer(int index) { - _remove("servers", index, Server.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createList("tags", "tags", StringOverlay.factory); - _createScalar("summary", "summary", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); - _createScalar("operationId", "operationId", StringOverlay.factory); - _createList("parameters", "parameters", ParameterImpl.factory); - _createScalar("requestBody", "requestBody", RequestBodyImpl.factory); - _createMap("responses", "responses", ResponseImpl.factory, "default|(\\d\\d\\d)"); - _createMap("responsesExtensions", "responses", ObjectOverlay.factory, "x-.+"); - _createMap("callbacks", "callbacks", CallbackImpl.factory, "(?!x-)[a-zA-Z0-9\\._-]+"); - _createMap("callbacksExtensions", "callbacks", ObjectOverlay.factory, "x-.+"); - _createScalar("deprecated", "deprecated", BooleanOverlay.factory); - _createList("securityRequirements", "security", SecurityRequirementImpl.factory); - _createList("servers", "servers", ServerImpl.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return OperationImpl.class; - } - - @Override - public JsonOverlay _create(Operation operation, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new OperationImpl(operation, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new OperationImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Operation operation) { - return Operation.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Operation.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OperationImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OperationImpl(Operation operation, JsonOverlay parent, ReferenceManager refMgr) { + super(operation, parent, factory, refMgr); + } + + // Tag + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getTags() { + return _getList("tags", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getTags(boolean elaborate) { + return _getList("tags", elaborate, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasTags() { + return _isPresent("tags"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getTag(int index) { + return _get("tags", index, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTags(List tags) { + _setList("tags", tags, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTag(int index, String tag) { + _set("tags", index, tag, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addTag(String tag) { + _add("tags", tag, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertTag(int index, String tag) { + _insert("tags", index, tag, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeTag(int index) { + _remove("tags", index, String.class); + } + + // Summary + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getSummary() { + return _get("summary", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSummary(String summary) { + _setScalar("summary", summary, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // ExternalDocs + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs() { + return _get("externalDocs", ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs(boolean elaborate) { + return _get("externalDocs", elaborate, ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExternalDocs(ExternalDocs externalDocs) { + _setScalar("externalDocs", externalDocs, ExternalDocs.class); + } + + // OperationId + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getOperationId() { + return _get("operationId", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOperationId(String operationId) { + _setScalar("operationId", operationId, String.class); + } + + // Parameter + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getParameters() { + return _getList("parameters", Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getParameters(boolean elaborate) { + return _getList("parameters", elaborate, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameters() { + return _isPresent("parameters"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Parameter getParameter(int index) { + return _get("parameters", index, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameters(List parameters) { + _setList("parameters", parameters, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameter(int index, Parameter parameter) { + _set("parameters", index, parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addParameter(Parameter parameter) { + _add("parameters", parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertParameter(int index, Parameter parameter) { + _insert("parameters", index, parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeParameter(int index) { + _remove("parameters", index, Parameter.class); + } + + // RequestBody + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public RequestBody getRequestBody() { + return _get("requestBody", RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public RequestBody getRequestBody(boolean elaborate) { + return _get("requestBody", elaborate, RequestBody.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequestBody(RequestBody requestBody) { + _setScalar("requestBody", requestBody, RequestBody.class); + } + + // Response + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getResponses() { + return _getMap("responses", Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getResponses(boolean elaborate) { + return _getMap("responses", elaborate, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasResponses() { + return _isPresent("responses"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasResponse(String name) { + return _getMap("responses", Response.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Response getResponse(String name) { + return _get("responses", name, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setResponses(Map responses) { + _setMap("responses", responses, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setResponse(String name, Response response) { + _set("responses", name, response, Response.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeResponse(String name) { + _remove("responses", name, Response.class); + } + + // ResponsesExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getResponsesExtensions() { + return _getMap("responsesExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getResponsesExtensions(boolean elaborate) { + return _getMap("responsesExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasResponsesExtensions() { + return _isPresent("responsesExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasResponsesExtension(String name) { + return _getMap("responsesExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getResponsesExtension(String name) { + return _get("responsesExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setResponsesExtensions(Map responsesExtensions) { + _setMap("responsesExtensions", responsesExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setResponsesExtension(String name, Object responsesExtension) { + _set("responsesExtensions", name, responsesExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeResponsesExtension(String name) { + _remove("responsesExtensions", name, Object.class); + } + + // Callback + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbacks() { + return _getMap("callbacks", Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbacks(boolean elaborate) { + return _getMap("callbacks", elaborate, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallbacks() { + return _isPresent("callbacks"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallback(String name) { + return _getMap("callbacks", Callback.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Callback getCallback(String name) { + return _get("callbacks", name, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallbacks(Map callbacks) { + _setMap("callbacks", callbacks, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallback(String name, Callback callback) { + _set("callbacks", name, callback, Callback.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeCallback(String name) { + _remove("callbacks", name, Callback.class); + } + + // CallbacksExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbacksExtensions() { + return _getMap("callbacksExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getCallbacksExtensions(boolean elaborate) { + return _getMap("callbacksExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallbacksExtensions() { + return _isPresent("callbacksExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasCallbacksExtension(String name) { + return _getMap("callbacksExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getCallbacksExtension(String name) { + return _get("callbacksExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallbacksExtensions(Map callbacksExtensions) { + _setMap("callbacksExtensions", callbacksExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setCallbacksExtension(String name, Object callbacksExtension) { + _set("callbacksExtensions", name, callbacksExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeCallbacksExtension(String name) { + _remove("callbacksExtensions", name, Object.class); + } + + // Deprecated + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getDeprecated() { + return _get("deprecated", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isDeprecated() { + Boolean bool = _get("deprecated", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDeprecated(Boolean deprecated) { + _setScalar("deprecated", deprecated, Boolean.class); + } + + // SecurityRequirement + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getSecurityRequirements() { + return _getList("securityRequirements", SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getSecurityRequirements(boolean elaborate) { + return _getList("securityRequirements", elaborate, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasSecurityRequirements() { + return _isPresent("securityRequirements"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityRequirement getSecurityRequirement(int index) { + return _get("securityRequirements", index, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSecurityRequirements(List securityRequirements) { + _setList("securityRequirements", securityRequirements, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSecurityRequirement(int index, SecurityRequirement securityRequirement) { + _set("securityRequirements", index, securityRequirement, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addSecurityRequirement(SecurityRequirement securityRequirement) { + _add("securityRequirements", securityRequirement, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertSecurityRequirement(int index, SecurityRequirement securityRequirement) { + _insert("securityRequirements", index, securityRequirement, SecurityRequirement.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeSecurityRequirement(int index) { + _remove("securityRequirements", index, SecurityRequirement.class); + } + + // Server + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getServers() { + return _getList("servers", Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getServers(boolean elaborate) { + return _getList("servers", elaborate, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasServers() { + return _isPresent("servers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Server getServer(int index) { + return _get("servers", index, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServers(List servers) { + _setList("servers", servers, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServer(int index, Server server) { + _set("servers", index, server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addServer(Server server) { + _add("servers", server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertServer(int index, Server server) { + _insert("servers", index, server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeServer(int index) { + _remove("servers", index, Server.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createList("tags", "tags", StringOverlay.factory); + _createScalar("summary", "summary", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); + _createScalar("operationId", "operationId", StringOverlay.factory); + _createList("parameters", "parameters", ParameterImpl.factory); + _createScalar("requestBody", "requestBody", RequestBodyImpl.factory); + _createMap("responses", "responses", ResponseImpl.factory, "default|(\\d\\d\\d)"); + _createMap("responsesExtensions", "responses", ObjectOverlay.factory, "x-.+"); + _createMap("callbacks", "callbacks", CallbackImpl.factory, "(?!x-)[a-zA-Z0-9\\._-]+"); + _createMap("callbacksExtensions", "callbacks", ObjectOverlay.factory, "x-.+"); + _createScalar("deprecated", "deprecated", BooleanOverlay.factory); + _createList("securityRequirements", "security", SecurityRequirementImpl.factory); + _createList("servers", "servers", ServerImpl.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return OperationImpl.class; + } + + @Override + public JsonOverlay _create(Operation operation, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new OperationImpl(operation, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new OperationImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Operation operation) { + return Operation.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Operation.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ParameterImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ParameterImpl.java index 86a8baf3..9b60ca59 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ParameterImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ParameterImpl.java @@ -22,425 +22,425 @@ public class ParameterImpl extends PropertiesOverlay implements Parameter { - private Overlay overlay = Overlay.of(this); - - @Override - public String getKey() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ParameterImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ParameterImpl(Parameter parameter, JsonOverlay parent, ReferenceManager refMgr) { - super(parameter, parent, factory, refMgr); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // In - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getIn() { - return _get("in", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setIn(String in) { - _setScalar("in", in, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Required - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getRequired() { - return _get("required", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isRequired() { - Boolean bool = _get("required", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequired(Boolean required) { - _setScalar("required", required, Boolean.class); - } - - // Deprecated - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getDeprecated() { - return _get("deprecated", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isDeprecated() { - Boolean bool = _get("deprecated", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDeprecated(Boolean deprecated) { - _setScalar("deprecated", deprecated, Boolean.class); - } - - // AllowEmptyValue - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getAllowEmptyValue() { - return _get("allowEmptyValue", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isAllowEmptyValue() { - Boolean bool = _get("allowEmptyValue", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAllowEmptyValue(Boolean allowEmptyValue) { - _setScalar("allowEmptyValue", allowEmptyValue, Boolean.class); - } - - // Style - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getStyle() { - return _get("style", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setStyle(String style) { - _setScalar("style", style, String.class); - } - - // Explode - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getExplode() { - return _get("explode", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isExplode() { - Boolean bool = _get("explode", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExplode(Boolean explode) { - _setScalar("explode", explode, Boolean.class); - } - - // AllowReserved - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getAllowReserved() { - return _get("allowReserved", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isAllowReserved() { - Boolean bool = _get("allowReserved", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAllowReserved(Boolean allowReserved) { - _setScalar("allowReserved", allowReserved, Boolean.class); - } - - // Schema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema() { - return _get("schema", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getSchema(boolean elaborate) { - return _get("schema", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSchema(Schema schema) { - _setScalar("schema", schema, Schema.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExample() { - return _get("example", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(Object example) { - _setScalar("example", example, Object.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples() { - return _getMap("examples", Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples(boolean elaborate) { - return _getMap("examples", elaborate, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExamples() { - return _isPresent("examples"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExample(String name) { - return _getMap("examples", Example.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Example getExample(String name) { - return _get("examples", name, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExamples(Map examples) { - _setMap("examples", examples, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(String name, Example example) { - _set("examples", name, example, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExample(String name) { - _remove("examples", name, Example.class); - } - - // ContentMediaType - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes() { - return _getMap("contentMediaTypes", MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes(boolean elaborate) { - return _getMap("contentMediaTypes", elaborate, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaTypes() { - return _isPresent("contentMediaTypes"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaType(String name) { - return _getMap("contentMediaTypes", MediaType.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public MediaType getContentMediaType(String name) { - return _get("contentMediaTypes", name, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaTypes(Map contentMediaTypes) { - _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaType(String name, MediaType contentMediaType) { - _set("contentMediaTypes", name, contentMediaType, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeContentMediaType(String name) { - _remove("contentMediaTypes", name, MediaType.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("in", "in", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("required", "required", BooleanOverlay.factory); - _createScalar("deprecated", "deprecated", BooleanOverlay.factory); - _createScalar("allowEmptyValue", "allowEmptyValue", BooleanOverlay.factory); - _createScalar("style", "style", StringOverlay.factory); - _createScalar("explode", "explode", BooleanOverlay.factory); - _createScalar("allowReserved", "allowReserved", BooleanOverlay.factory); - _createScalar("schema", "schema", SchemaImpl.factory); - _createScalar("example", "example", ObjectOverlay.factory); - _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ParameterImpl.class; - } - - @Override - public JsonOverlay _create(Parameter parameter, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ParameterImpl(parameter, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ParameterImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Parameter parameter) { - return Parameter.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Parameter.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getKey() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ParameterImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ParameterImpl(Parameter parameter, JsonOverlay parent, ReferenceManager refMgr) { + super(parameter, parent, factory, refMgr); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // In + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getIn() { + return _get("in", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setIn(String in) { + _setScalar("in", in, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Required + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getRequired() { + return _get("required", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isRequired() { + Boolean bool = _get("required", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequired(Boolean required) { + _setScalar("required", required, Boolean.class); + } + + // Deprecated + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getDeprecated() { + return _get("deprecated", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isDeprecated() { + Boolean bool = _get("deprecated", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDeprecated(Boolean deprecated) { + _setScalar("deprecated", deprecated, Boolean.class); + } + + // AllowEmptyValue + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getAllowEmptyValue() { + return _get("allowEmptyValue", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isAllowEmptyValue() { + Boolean bool = _get("allowEmptyValue", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAllowEmptyValue(Boolean allowEmptyValue) { + _setScalar("allowEmptyValue", allowEmptyValue, Boolean.class); + } + + // Style + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getStyle() { + return _get("style", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setStyle(String style) { + _setScalar("style", style, String.class); + } + + // Explode + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getExplode() { + return _get("explode", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isExplode() { + Boolean bool = _get("explode", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExplode(Boolean explode) { + _setScalar("explode", explode, Boolean.class); + } + + // AllowReserved + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getAllowReserved() { + return _get("allowReserved", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isAllowReserved() { + Boolean bool = _get("allowReserved", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAllowReserved(Boolean allowReserved) { + _setScalar("allowReserved", allowReserved, Boolean.class); + } + + // Schema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema() { + return _get("schema", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getSchema(boolean elaborate) { + return _get("schema", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSchema(Schema schema) { + _setScalar("schema", schema, Schema.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExample() { + return _get("example", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(Object example) { + _setScalar("example", example, Object.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples() { + return _getMap("examples", Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples(boolean elaborate) { + return _getMap("examples", elaborate, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExamples() { + return _isPresent("examples"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExample(String name) { + return _getMap("examples", Example.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Example getExample(String name) { + return _get("examples", name, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExamples(Map examples) { + _setMap("examples", examples, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(String name, Example example) { + _set("examples", name, example, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExample(String name) { + _remove("examples", name, Example.class); + } + + // ContentMediaType + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes() { + return _getMap("contentMediaTypes", MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes(boolean elaborate) { + return _getMap("contentMediaTypes", elaborate, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaTypes() { + return _isPresent("contentMediaTypes"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaType(String name) { + return _getMap("contentMediaTypes", MediaType.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public MediaType getContentMediaType(String name) { + return _get("contentMediaTypes", name, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaTypes(Map contentMediaTypes) { + _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaType(String name, MediaType contentMediaType) { + _set("contentMediaTypes", name, contentMediaType, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeContentMediaType(String name) { + _remove("contentMediaTypes", name, MediaType.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("in", "in", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("required", "required", BooleanOverlay.factory); + _createScalar("deprecated", "deprecated", BooleanOverlay.factory); + _createScalar("allowEmptyValue", "allowEmptyValue", BooleanOverlay.factory); + _createScalar("style", "style", StringOverlay.factory); + _createScalar("explode", "explode", BooleanOverlay.factory); + _createScalar("allowReserved", "allowReserved", BooleanOverlay.factory); + _createScalar("schema", "schema", SchemaImpl.factory); + _createScalar("example", "example", ObjectOverlay.factory); + _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return ParameterImpl.class; + } + + @Override + public JsonOverlay _create(Parameter parameter, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ParameterImpl(parameter, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ParameterImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Parameter parameter) { + return Parameter.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Parameter.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/PathImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/PathImpl.java index ea48a948..b9ccc7d8 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/PathImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/PathImpl.java @@ -22,440 +22,440 @@ public class PathImpl extends PropertiesOverlay implements Path { - private Overlay overlay = Overlay.of(this); - - @Override - public String getPathString() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Override - public Operation getGet() { - return getOperations().get("get"); - } - - @Override - public Operation getGet(boolean elaborate) { - return getOperations(elaborate).get("get"); - } - - @Override - public void setGet(Operation get) { - getOperations().put("get", get); - } - - @Override - public Operation getPut() { - return getOperations().get("put"); - } - - @Override - public Operation getPut(boolean elaborate) { - return getOperations(elaborate).get("put"); - } - - @Override - public void setPut(Operation put) { - getOperations().put("put", put); - } - - @Override - public Operation getPost() { - return getOperations().get("post"); - } - - @Override - public Operation getPost(boolean elaborate) { - return getOperations(elaborate).get("post"); - } - - @Override - public void setPost(Operation post) { - getOperations().put("post", post); - } - - @Override - public Operation getDelete() { - return getOperations().get("delete"); - } - - @Override - public Operation getDelete(boolean elaborate) { - return getOperations(elaborate).get("delete"); - } - - @Override - public void setDelete(Operation delete) { - getOperations().put("delete", delete); - } - - @Override - public Operation getOptions() { - return getOperations().get("options"); - } - - @Override - public Operation getOptions(boolean elaborate) { - return getOperations(elaborate).get("options"); - } - - @Override - public void setOptions(Operation options) { - getOperations().put("options", options); - } - - @Override - public Operation getHead() { - return getOperations().get("head"); - } - - @Override - public Operation getHead(boolean elaborate) { - return getOperations(elaborate).get("head"); - } - - @Override - public void setHead(Operation head) { - getOperations().put("head", head); - } - - @Override - public Operation getPatch() { - return getOperations().get("patch"); - } - - @Override - public Operation getPatch(boolean elaborate) { - return getOperations(elaborate).get("patch"); - } - - @Override - public void setPatch(Operation patch) { - getOperations().put("patch", patch); - } - - @Override - public Operation getTrace() { - return getOperations().get("trace"); - } - - @Override - public Operation getTrace(boolean elaborate) { - return getOperations(elaborate).get("trace"); - } - - @Override - public void setTrace(Operation trace) { - getOperations().put("trace", trace); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public PathImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public PathImpl(Path path, JsonOverlay parent, ReferenceManager refMgr) { - super(path, parent, factory, refMgr); - } - - // Summary - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getSummary() { - return _get("summary", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setSummary(String summary) { - _setScalar("summary", summary, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Operation - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getOperations() { - return _getMap("operations", Operation.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getOperations(boolean elaborate) { - return _getMap("operations", elaborate, Operation.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasOperations() { - return _isPresent("operations"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasOperation(String name) { - return _getMap("operations", Operation.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Operation getOperation(String name) { - return _get("operations", name, Operation.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOperations(Map operations) { - _setMap("operations", operations, Operation.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOperation(String name, Operation operation) { - _set("operations", name, operation, Operation.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeOperation(String name) { - _remove("operations", name, Operation.class); - } - - // Server - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getServers() { - return _getList("servers", Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getServers(boolean elaborate) { - return _getList("servers", elaborate, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasServers() { - return _isPresent("servers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Server getServer(int index) { - return _get("servers", index, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServers(List servers) { - _setList("servers", servers, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServer(int index, Server server) { - _set("servers", index, server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addServer(Server server) { - _add("servers", server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertServer(int index, Server server) { - _insert("servers", index, server, Server.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeServer(int index) { - _remove("servers", index, Server.class); - } - - // Parameter - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getParameters() { - return _getList("parameters", Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getParameters(boolean elaborate) { - return _getList("parameters", elaborate, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameters() { - return _isPresent("parameters"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Parameter getParameter(int index) { - return _get("parameters", index, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameters(List parameters) { - _setList("parameters", parameters, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameter(int index, Parameter parameter) { - _set("parameters", index, parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addParameter(Parameter parameter) { - _add("parameters", parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertParameter(int index, Parameter parameter) { - _insert("parameters", index, parameter, Parameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeParameter(int index) { - _remove("parameters", index, Parameter.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("summary", "summary", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createMap("operations", "", OperationImpl.factory, "get|put|post|delete|options|head|patch|trace"); - _createList("servers", "servers", ServerImpl.factory); - _createList("parameters", "parameters", ParameterImpl.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return PathImpl.class; - } - - @Override - public JsonOverlay _create(Path path, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new PathImpl(path, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new PathImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Path path) { - return Path.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Path.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getPathString() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Override + public Operation getGet() { + return getOperations().get("get"); + } + + @Override + public Operation getGet(boolean elaborate) { + return getOperations(elaborate).get("get"); + } + + @Override + public void setGet(Operation get) { + getOperations().put("get", get); + } + + @Override + public Operation getPut() { + return getOperations().get("put"); + } + + @Override + public Operation getPut(boolean elaborate) { + return getOperations(elaborate).get("put"); + } + + @Override + public void setPut(Operation put) { + getOperations().put("put", put); + } + + @Override + public Operation getPost() { + return getOperations().get("post"); + } + + @Override + public Operation getPost(boolean elaborate) { + return getOperations(elaborate).get("post"); + } + + @Override + public void setPost(Operation post) { + getOperations().put("post", post); + } + + @Override + public Operation getDelete() { + return getOperations().get("delete"); + } + + @Override + public Operation getDelete(boolean elaborate) { + return getOperations(elaborate).get("delete"); + } + + @Override + public void setDelete(Operation delete) { + getOperations().put("delete", delete); + } + + @Override + public Operation getOptions() { + return getOperations().get("options"); + } + + @Override + public Operation getOptions(boolean elaborate) { + return getOperations(elaborate).get("options"); + } + + @Override + public void setOptions(Operation options) { + getOperations().put("options", options); + } + + @Override + public Operation getHead() { + return getOperations().get("head"); + } + + @Override + public Operation getHead(boolean elaborate) { + return getOperations(elaborate).get("head"); + } + + @Override + public void setHead(Operation head) { + getOperations().put("head", head); + } + + @Override + public Operation getPatch() { + return getOperations().get("patch"); + } + + @Override + public Operation getPatch(boolean elaborate) { + return getOperations(elaborate).get("patch"); + } + + @Override + public void setPatch(Operation patch) { + getOperations().put("patch", patch); + } + + @Override + public Operation getTrace() { + return getOperations().get("trace"); + } + + @Override + public Operation getTrace(boolean elaborate) { + return getOperations(elaborate).get("trace"); + } + + @Override + public void setTrace(Operation trace) { + getOperations().put("trace", trace); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public PathImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public PathImpl(Path path, JsonOverlay parent, ReferenceManager refMgr) { + super(path, parent, factory, refMgr); + } + + // Summary + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getSummary() { + return _get("summary", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setSummary(String summary) { + _setScalar("summary", summary, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Operation + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getOperations() { + return _getMap("operations", Operation.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getOperations(boolean elaborate) { + return _getMap("operations", elaborate, Operation.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasOperations() { + return _isPresent("operations"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasOperation(String name) { + return _getMap("operations", Operation.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Operation getOperation(String name) { + return _get("operations", name, Operation.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOperations(Map operations) { + _setMap("operations", operations, Operation.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOperation(String name, Operation operation) { + _set("operations", name, operation, Operation.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeOperation(String name) { + _remove("operations", name, Operation.class); + } + + // Server + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getServers() { + return _getList("servers", Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getServers(boolean elaborate) { + return _getList("servers", elaborate, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasServers() { + return _isPresent("servers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Server getServer(int index) { + return _get("servers", index, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServers(List servers) { + _setList("servers", servers, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServer(int index, Server server) { + _set("servers", index, server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addServer(Server server) { + _add("servers", server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertServer(int index, Server server) { + _insert("servers", index, server, Server.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeServer(int index) { + _remove("servers", index, Server.class); + } + + // Parameter + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getParameters() { + return _getList("parameters", Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getParameters(boolean elaborate) { + return _getList("parameters", elaborate, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameters() { + return _isPresent("parameters"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Parameter getParameter(int index) { + return _get("parameters", index, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameters(List parameters) { + _setList("parameters", parameters, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameter(int index, Parameter parameter) { + _set("parameters", index, parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addParameter(Parameter parameter) { + _add("parameters", parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertParameter(int index, Parameter parameter) { + _insert("parameters", index, parameter, Parameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeParameter(int index) { + _remove("parameters", index, Parameter.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("summary", "summary", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createMap("operations", "", OperationImpl.factory, "get|put|post|delete|options|head|patch|trace"); + _createList("servers", "servers", ServerImpl.factory); + _createList("parameters", "parameters", ParameterImpl.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return PathImpl.class; + } + + @Override + public JsonOverlay _create(Path path, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new PathImpl(path, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new PathImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Path path) { + return Path.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Path.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/RequestBodyImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/RequestBodyImpl.java index 04ea988f..6521c5e6 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/RequestBodyImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/RequestBodyImpl.java @@ -20,216 +20,216 @@ public class RequestBodyImpl extends PropertiesOverlay implements RequestBody { - private Overlay overlay = Overlay.of(this); - - @Override - public String getName() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public RequestBodyImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public RequestBodyImpl(RequestBody requestBody, JsonOverlay parent, ReferenceManager refMgr) { - super(requestBody, parent, factory, refMgr); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // ContentMediaType - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes() { - return _getMap("contentMediaTypes", MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes(boolean elaborate) { - return _getMap("contentMediaTypes", elaborate, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaTypes() { - return _isPresent("contentMediaTypes"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaType(String name) { - return _getMap("contentMediaTypes", MediaType.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public MediaType getContentMediaType(String name) { - return _get("contentMediaTypes", name, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaTypes(Map contentMediaTypes) { - _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaType(String name, MediaType contentMediaType) { - _set("contentMediaTypes", name, contentMediaType, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeContentMediaType(String name) { - _remove("contentMediaTypes", name, MediaType.class); - } - - // Required - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getRequired() { - return _get("required", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isRequired() { - Boolean bool = _get("required", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequired(Boolean required) { - _setScalar("required", required, Boolean.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("description", "description", StringOverlay.factory); - _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); - _createScalar("required", "required", BooleanOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return RequestBodyImpl.class; - } - - @Override - public JsonOverlay _create(RequestBody requestBody, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new RequestBodyImpl(requestBody, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new RequestBodyImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(RequestBody requestBody) { - return RequestBody.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return RequestBody.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getName() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public RequestBodyImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public RequestBodyImpl(RequestBody requestBody, JsonOverlay parent, ReferenceManager refMgr) { + super(requestBody, parent, factory, refMgr); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // ContentMediaType + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes() { + return _getMap("contentMediaTypes", MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes(boolean elaborate) { + return _getMap("contentMediaTypes", elaborate, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaTypes() { + return _isPresent("contentMediaTypes"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaType(String name) { + return _getMap("contentMediaTypes", MediaType.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public MediaType getContentMediaType(String name) { + return _get("contentMediaTypes", name, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaTypes(Map contentMediaTypes) { + _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaType(String name, MediaType contentMediaType) { + _set("contentMediaTypes", name, contentMediaType, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeContentMediaType(String name) { + _remove("contentMediaTypes", name, MediaType.class); + } + + // Required + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getRequired() { + return _get("required", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isRequired() { + Boolean bool = _get("required", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequired(Boolean required) { + _setScalar("required", required, Boolean.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("description", "description", StringOverlay.factory); + _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); + _createScalar("required", "required", BooleanOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return RequestBodyImpl.class; + } + + @Override + public JsonOverlay _create(RequestBody requestBody, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new RequestBodyImpl(requestBody, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new RequestBodyImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(RequestBody requestBody) { + return RequestBody.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return RequestBody.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ResponseImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ResponseImpl.java index 9aae9b8d..44f0168e 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ResponseImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ResponseImpl.java @@ -21,294 +21,294 @@ public class ResponseImpl extends PropertiesOverlay implements Response { - private Overlay overlay = Overlay.of(this); - - @Override - public String getName() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ResponseImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ResponseImpl(Response response, JsonOverlay parent, ReferenceManager refMgr) { - super(response, parent, factory, refMgr); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Header - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders() { - return _getMap("headers", Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getHeaders(boolean elaborate) { - return _getMap("headers", elaborate, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeaders() { - return _isPresent("headers"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasHeader(String name) { - return _getMap("headers", Header.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Header getHeader(String name) { - return _get("headers", name, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeaders(Map headers) { - _setMap("headers", headers, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setHeader(String name, Header header) { - _set("headers", name, header, Header.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeHeader(String name) { - _remove("headers", name, Header.class); - } - - // ContentMediaType - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes() { - return _getMap("contentMediaTypes", MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getContentMediaTypes(boolean elaborate) { - return _getMap("contentMediaTypes", elaborate, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaTypes() { - return _isPresent("contentMediaTypes"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasContentMediaType(String name) { - return _getMap("contentMediaTypes", MediaType.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public MediaType getContentMediaType(String name) { - return _get("contentMediaTypes", name, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaTypes(Map contentMediaTypes) { - _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setContentMediaType(String name, MediaType contentMediaType) { - _set("contentMediaTypes", name, contentMediaType, MediaType.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeContentMediaType(String name) { - _remove("contentMediaTypes", name, MediaType.class); - } - - // Link - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getLinks() { - return _getMap("links", Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getLinks(boolean elaborate) { - return _getMap("links", elaborate, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasLinks() { - return _isPresent("links"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasLink(String name) { - return _getMap("links", Link.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Link getLink(String name) { - return _get("links", name, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setLinks(Map links) { - _setMap("links", links, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setLink(String name, Link link) { - _set("links", name, link, Link.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeLink(String name) { - _remove("links", name, Link.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("description", "description", StringOverlay.factory); - _createMap("headers", "headers", HeaderImpl.factory, null); - _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); - _createMap("links", "links", LinkImpl.factory, null); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ResponseImpl.class; - } - - @Override - public JsonOverlay _create(Response response, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ResponseImpl(response, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ResponseImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Response response) { - return Response.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Response.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getName() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ResponseImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ResponseImpl(Response response, JsonOverlay parent, ReferenceManager refMgr) { + super(response, parent, factory, refMgr); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Header + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders() { + return _getMap("headers", Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getHeaders(boolean elaborate) { + return _getMap("headers", elaborate, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeaders() { + return _isPresent("headers"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasHeader(String name) { + return _getMap("headers", Header.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Header getHeader(String name) { + return _get("headers", name, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeaders(Map headers) { + _setMap("headers", headers, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setHeader(String name, Header header) { + _set("headers", name, header, Header.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeHeader(String name) { + _remove("headers", name, Header.class); + } + + // ContentMediaType + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes() { + return _getMap("contentMediaTypes", MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getContentMediaTypes(boolean elaborate) { + return _getMap("contentMediaTypes", elaborate, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaTypes() { + return _isPresent("contentMediaTypes"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasContentMediaType(String name) { + return _getMap("contentMediaTypes", MediaType.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public MediaType getContentMediaType(String name) { + return _get("contentMediaTypes", name, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaTypes(Map contentMediaTypes) { + _setMap("contentMediaTypes", contentMediaTypes, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setContentMediaType(String name, MediaType contentMediaType) { + _set("contentMediaTypes", name, contentMediaType, MediaType.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeContentMediaType(String name) { + _remove("contentMediaTypes", name, MediaType.class); + } + + // Link + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getLinks() { + return _getMap("links", Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getLinks(boolean elaborate) { + return _getMap("links", elaborate, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasLinks() { + return _isPresent("links"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasLink(String name) { + return _getMap("links", Link.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Link getLink(String name) { + return _get("links", name, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setLinks(Map links) { + _setMap("links", links, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setLink(String name, Link link) { + _set("links", name, link, Link.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeLink(String name) { + _remove("links", name, Link.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("description", "description", StringOverlay.factory); + _createMap("headers", "headers", HeaderImpl.factory, null); + _createMap("contentMediaTypes", "content", MediaTypeImpl.factory, null); + _createMap("links", "links", LinkImpl.factory, null); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return ResponseImpl.class; + } + + @Override + public JsonOverlay _create(Response response, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ResponseImpl(response, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ResponseImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Response response) { + return Response.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Response.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SchemaImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SchemaImpl.java index 6e6d4e3c..c11ca7e7 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SchemaImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SchemaImpl.java @@ -26,1026 +26,1026 @@ public class SchemaImpl extends PropertiesOverlay implements Schema { - private Overlay overlay = Overlay.of(this); - - @Override - public String getName() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Override - public JsonOverlay _findInternal(JsonPointer path) { - if (path.matchesProperty("additionalProperties")) { - return path.tail().matches() ? _getOverlay("additionalProperties", BooleanOverlay.class) - : _get("additionalPropertiesSchema", SchemaImpl.class)._findInternal(path.tail()); - } else { - return super._findInternal(path); - } - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SchemaImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SchemaImpl(Schema schema, JsonOverlay parent, ReferenceManager refMgr) { - super(schema, parent, factory, refMgr); - } - - // Title - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getTitle() { - return _get("title", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setTitle(String title) { - _setScalar("title", title, String.class); - } - - // MultipleOf - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Number getMultipleOf() { - return _get("multipleOf", Number.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMultipleOf(Number multipleOf) { - _setScalar("multipleOf", multipleOf, Number.class); - } - - // Maximum - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Number getMaximum() { - return _get("maximum", Number.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMaximum(Number maximum) { - _setScalar("maximum", maximum, Number.class); - } - - // ExclusiveMaximum - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getExclusiveMaximum() { - return _get("exclusiveMaximum", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isExclusiveMaximum() { - Boolean bool = _get("exclusiveMaximum", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExclusiveMaximum(Boolean exclusiveMaximum) { - _setScalar("exclusiveMaximum", exclusiveMaximum, Boolean.class); - } - - // Minimum - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Number getMinimum() { - return _get("minimum", Number.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMinimum(Number minimum) { - _setScalar("minimum", minimum, Number.class); - } - - // ExclusiveMinimum - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getExclusiveMinimum() { - return _get("exclusiveMinimum", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isExclusiveMinimum() { - Boolean bool = _get("exclusiveMinimum", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExclusiveMinimum(Boolean exclusiveMinimum) { - _setScalar("exclusiveMinimum", exclusiveMinimum, Boolean.class); - } - - // MaxLength - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Integer getMaxLength() { - return _get("maxLength", Integer.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMaxLength(Integer maxLength) { - _setScalar("maxLength", maxLength, Integer.class); - } - - // MinLength - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Integer getMinLength() { - return _get("minLength", Integer.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMinLength(Integer minLength) { - _setScalar("minLength", minLength, Integer.class); - } - - // Pattern - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getPattern() { - return _get("pattern", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPattern(String pattern) { - _setScalar("pattern", pattern, String.class); - } - - // MaxItems - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Integer getMaxItems() { - return _get("maxItems", Integer.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMaxItems(Integer maxItems) { - _setScalar("maxItems", maxItems, Integer.class); - } - - // MinItems - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Integer getMinItems() { - return _get("minItems", Integer.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMinItems(Integer minItems) { - _setScalar("minItems", minItems, Integer.class); - } - - // UniqueItems - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getUniqueItems() { - return _get("uniqueItems", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isUniqueItems() { - Boolean bool = _get("uniqueItems", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setUniqueItems(Boolean uniqueItems) { - _setScalar("uniqueItems", uniqueItems, Boolean.class); - } - - // MaxProperties - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Integer getMaxProperties() { - return _get("maxProperties", Integer.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMaxProperties(Integer maxProperties) { - _setScalar("maxProperties", maxProperties, Integer.class); - } - - // MinProperties - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Integer getMinProperties() { - return _get("minProperties", Integer.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setMinProperties(Integer minProperties) { - _setScalar("minProperties", minProperties, Integer.class); - } - - // RequiredField - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getRequiredFields() { - return _getList("requiredFields", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getRequiredFields(boolean elaborate) { - return _getList("requiredFields", elaborate, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasRequiredFields() { - return _isPresent("requiredFields"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getRequiredField(int index) { - return _get("requiredFields", index, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequiredFields(List requiredFields) { - _setList("requiredFields", requiredFields, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequiredField(int index, String requiredField) { - _set("requiredFields", index, requiredField, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addRequiredField(String requiredField) { - _add("requiredFields", requiredField, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertRequiredField(int index, String requiredField) { - _insert("requiredFields", index, requiredField, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeRequiredField(int index) { - _remove("requiredFields", index, String.class); - } - - // Enum - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getEnums() { - return _getList("enums", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getEnums(boolean elaborate) { - return _getList("enums", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasEnums() { - return _isPresent("enums"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getEnum(int index) { - return _get("enums", index, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEnums(List enums) { - _setList("enums", enums, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEnum(int index, Object enumValue) { - _set("enums", index, enumValue, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addEnum(Object enumValue) { - _add("enums", enumValue, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertEnum(int index, Object enumValue) { - _insert("enums", index, enumValue, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeEnum(int index) { - _remove("enums", index, Object.class); - } - - // Type - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getType() { - return _get("type", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setType(String type) { - _setScalar("type", type, String.class); - } - - // AllOfSchema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getAllOfSchemas() { - return _getList("allOfSchemas", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getAllOfSchemas(boolean elaborate) { - return _getList("allOfSchemas", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasAllOfSchemas() { - return _isPresent("allOfSchemas"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getAllOfSchema(int index) { - return _get("allOfSchemas", index, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAllOfSchemas(List allOfSchemas) { - _setList("allOfSchemas", allOfSchemas, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAllOfSchema(int index, Schema allOfSchema) { - _set("allOfSchemas", index, allOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addAllOfSchema(Schema allOfSchema) { - _add("allOfSchemas", allOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertAllOfSchema(int index, Schema allOfSchema) { - _insert("allOfSchemas", index, allOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeAllOfSchema(int index) { - _remove("allOfSchemas", index, Schema.class); - } - - // OneOfSchema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getOneOfSchemas() { - return _getList("oneOfSchemas", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getOneOfSchemas(boolean elaborate) { - return _getList("oneOfSchemas", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasOneOfSchemas() { - return _isPresent("oneOfSchemas"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getOneOfSchema(int index) { - return _get("oneOfSchemas", index, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOneOfSchemas(List oneOfSchemas) { - _setList("oneOfSchemas", oneOfSchemas, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOneOfSchema(int index, Schema oneOfSchema) { - _set("oneOfSchemas", index, oneOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addOneOfSchema(Schema oneOfSchema) { - _add("oneOfSchemas", oneOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertOneOfSchema(int index, Schema oneOfSchema) { - _insert("oneOfSchemas", index, oneOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeOneOfSchema(int index) { - _remove("oneOfSchemas", index, Schema.class); - } - - // AnyOfSchema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getAnyOfSchemas() { - return _getList("anyOfSchemas", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getAnyOfSchemas(boolean elaborate) { - return _getList("anyOfSchemas", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasAnyOfSchemas() { - return _isPresent("anyOfSchemas"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getAnyOfSchema(int index) { - return _get("anyOfSchemas", index, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAnyOfSchemas(List anyOfSchemas) { - _setList("anyOfSchemas", anyOfSchemas, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAnyOfSchema(int index, Schema anyOfSchema) { - _set("anyOfSchemas", index, anyOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addAnyOfSchema(Schema anyOfSchema) { - _add("anyOfSchemas", anyOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertAnyOfSchema(int index, Schema anyOfSchema) { - _insert("anyOfSchemas", index, anyOfSchema, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeAnyOfSchema(int index) { - _remove("anyOfSchemas", index, Schema.class); - } - - // NotSchema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getNotSchema() { - return _get("notSchema", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getNotSchema(boolean elaborate) { - return _get("notSchema", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setNotSchema(Schema notSchema) { - _setScalar("notSchema", notSchema, Schema.class); - } - - // ItemsSchema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getItemsSchema() { - return _get("itemsSchema", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getItemsSchema(boolean elaborate) { - return _get("itemsSchema", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setItemsSchema(Schema itemsSchema) { - _setScalar("itemsSchema", itemsSchema, Schema.class); - } - - // Property - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getProperties() { - return _getMap("properties", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getProperties(boolean elaborate) { - return _getMap("properties", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasProperties() { - return _isPresent("properties"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasProperty(String name) { - return _getMap("properties", Schema.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getProperty(String name) { - return _get("properties", name, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setProperties(Map properties) { - _setMap("properties", properties, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setProperty(String name, Schema property) { - _set("properties", name, property, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeProperty(String name) { - _remove("properties", name, Schema.class); - } - - // AdditionalPropertiesSchema - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getAdditionalPropertiesSchema() { - return _get("additionalPropertiesSchema", Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Schema getAdditionalPropertiesSchema(boolean elaborate) { - return _get("additionalPropertiesSchema", elaborate, Schema.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAdditionalPropertiesSchema(Schema additionalPropertiesSchema) { - _setScalar("additionalPropertiesSchema", additionalPropertiesSchema, Schema.class); - } - - // AdditionalProperties - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getAdditionalProperties() { - return _get("additionalProperties", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isAdditionalProperties() { - Boolean bool = _get("additionalProperties", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAdditionalProperties(Boolean additionalProperties) { - _setScalar("additionalProperties", additionalProperties, Boolean.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Format - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getFormat() { - return _get("format", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setFormat(String format) { - _setScalar("format", format, String.class); - } - - // Default - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getDefault() { - return _get("defaultValue", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDefault(Object defaultValue) { - _setScalar("defaultValue", defaultValue, Object.class); - } - - // Nullable - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getNullable() { - return _get("nullable", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isNullable() { - Boolean bool = _get("nullable", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setNullable(Boolean nullable) { - _setScalar("nullable", nullable, Boolean.class); - } - - // Discriminator - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDiscriminator() { - return _get("discriminator", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDiscriminator(String discriminator) { - _setScalar("discriminator", discriminator, String.class); - } - - // ReadOnly - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getReadOnly() { - return _get("readOnly", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isReadOnly() { - Boolean bool = _get("readOnly", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setReadOnly(Boolean readOnly) { - _setScalar("readOnly", readOnly, Boolean.class); - } - - // WriteOnly - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getWriteOnly() { - return _get("writeOnly", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isWriteOnly() { - Boolean bool = _get("writeOnly", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setWriteOnly(Boolean writeOnly) { - _setScalar("writeOnly", writeOnly, Boolean.class); - } - - // Xml - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Xml getXml() { - return _get("xml", Xml.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Xml getXml(boolean elaborate) { - return _get("xml", elaborate, Xml.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setXml(Xml xml) { - _setScalar("xml", xml, Xml.class); - } - - // ExternalDocs - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs() { - return _get("externalDocs", ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs(boolean elaborate) { - return _get("externalDocs", elaborate, ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExternalDocs(ExternalDocs externalDocs) { - _setScalar("externalDocs", externalDocs, ExternalDocs.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples() { - return _getMap("examples", Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExamples(boolean elaborate) { - return _getMap("examples", elaborate, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExamples() { - return _isPresent("examples"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExample(String name) { - return _getMap("examples", Example.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Example getExample(String name) { - return _get("examples", name, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExamples(Map examples) { - _setMap("examples", examples, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(String name, Example example) { - _set("examples", name, example, Example.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExample(String name) { - _remove("examples", name, Example.class); - } - - // Example - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExample() { - return _get("example", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExample(Object example) { - _setScalar("example", example, Object.class); - } - - // Deprecated - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getDeprecated() { - return _get("deprecated", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isDeprecated() { - Boolean bool = _get("deprecated", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDeprecated(Boolean deprecated) { - _setScalar("deprecated", deprecated, Boolean.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("title", "title", StringOverlay.factory); - _createScalar("multipleOf", "multipleOf", NumberOverlay.factory); - _createScalar("maximum", "maximum", NumberOverlay.factory); - _createScalar("exclusiveMaximum", "exclusiveMaximum", BooleanOverlay.factory); - _createScalar("minimum", "minimum", NumberOverlay.factory); - _createScalar("exclusiveMinimum", "exclusiveMinimum", BooleanOverlay.factory); - _createScalar("maxLength", "maxLength", IntegerOverlay.factory); - _createScalar("minLength", "minLength", IntegerOverlay.factory); - _createScalar("pattern", "pattern", StringOverlay.factory); - _createScalar("maxItems", "maxItems", IntegerOverlay.factory); - _createScalar("minItems", "minItems", IntegerOverlay.factory); - _createScalar("uniqueItems", "uniqueItems", BooleanOverlay.factory); - _createScalar("maxProperties", "maxProperties", IntegerOverlay.factory); - _createScalar("minProperties", "minProperties", IntegerOverlay.factory); - _createList("requiredFields", "required", StringOverlay.factory); - _createList("enums", "enum", ObjectOverlay.factory); - _createScalar("type", "type", StringOverlay.factory); - _createList("allOfSchemas", "allOf", SchemaImpl.factory); - _createList("oneOfSchemas", "oneOf", SchemaImpl.factory); - _createList("anyOfSchemas", "anyOf", SchemaImpl.factory); - _createScalar("notSchema", "not", SchemaImpl.factory); - _createScalar("itemsSchema", "items", SchemaImpl.factory); - _createMap("properties", "properties", SchemaImpl.factory, null); - _createScalar("additionalPropertiesSchema", "additionalProperties", SchemaImpl.factory); - _createScalar("additionalProperties", "additionalProperties", BooleanOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("format", "format", StringOverlay.factory); - _createScalar("defaultValue", "default", ObjectOverlay.factory); - _createScalar("nullable", "nullable", BooleanOverlay.factory); - _createScalar("discriminator", "discriminator", StringOverlay.factory); - _createScalar("readOnly", "readOnly", BooleanOverlay.factory); - _createScalar("writeOnly", "writeOnly", BooleanOverlay.factory); - _createScalar("xml", "xml", XmlImpl.factory); - _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); - _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); - _createScalar("example", "example", ObjectOverlay.factory); - _createScalar("deprecated", "deprecated", BooleanOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return SchemaImpl.class; - } - - @Override - public JsonOverlay _create(Schema schema, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SchemaImpl(schema, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SchemaImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Schema schema) { - return Schema.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Schema.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getName() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Override + public JsonOverlay _findInternal(JsonPointer path) { + if (path.matchesProperty("additionalProperties")) { + return path.tail().matches() ? _getOverlay("additionalProperties", BooleanOverlay.class) + : _get("additionalPropertiesSchema", SchemaImpl.class)._findInternal(path.tail()); + } else { + return super._findInternal(path); + } + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SchemaImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SchemaImpl(Schema schema, JsonOverlay parent, ReferenceManager refMgr) { + super(schema, parent, factory, refMgr); + } + + // Title + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getTitle() { + return _get("title", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setTitle(String title) { + _setScalar("title", title, String.class); + } + + // MultipleOf + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Number getMultipleOf() { + return _get("multipleOf", Number.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMultipleOf(Number multipleOf) { + _setScalar("multipleOf", multipleOf, Number.class); + } + + // Maximum + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Number getMaximum() { + return _get("maximum", Number.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMaximum(Number maximum) { + _setScalar("maximum", maximum, Number.class); + } + + // ExclusiveMaximum + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getExclusiveMaximum() { + return _get("exclusiveMaximum", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isExclusiveMaximum() { + Boolean bool = _get("exclusiveMaximum", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExclusiveMaximum(Boolean exclusiveMaximum) { + _setScalar("exclusiveMaximum", exclusiveMaximum, Boolean.class); + } + + // Minimum + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Number getMinimum() { + return _get("minimum", Number.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMinimum(Number minimum) { + _setScalar("minimum", minimum, Number.class); + } + + // ExclusiveMinimum + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getExclusiveMinimum() { + return _get("exclusiveMinimum", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isExclusiveMinimum() { + Boolean bool = _get("exclusiveMinimum", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExclusiveMinimum(Boolean exclusiveMinimum) { + _setScalar("exclusiveMinimum", exclusiveMinimum, Boolean.class); + } + + // MaxLength + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Integer getMaxLength() { + return _get("maxLength", Integer.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMaxLength(Integer maxLength) { + _setScalar("maxLength", maxLength, Integer.class); + } + + // MinLength + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Integer getMinLength() { + return _get("minLength", Integer.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMinLength(Integer minLength) { + _setScalar("minLength", minLength, Integer.class); + } + + // Pattern + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getPattern() { + return _get("pattern", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPattern(String pattern) { + _setScalar("pattern", pattern, String.class); + } + + // MaxItems + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Integer getMaxItems() { + return _get("maxItems", Integer.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMaxItems(Integer maxItems) { + _setScalar("maxItems", maxItems, Integer.class); + } + + // MinItems + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Integer getMinItems() { + return _get("minItems", Integer.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMinItems(Integer minItems) { + _setScalar("minItems", minItems, Integer.class); + } + + // UniqueItems + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getUniqueItems() { + return _get("uniqueItems", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isUniqueItems() { + Boolean bool = _get("uniqueItems", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setUniqueItems(Boolean uniqueItems) { + _setScalar("uniqueItems", uniqueItems, Boolean.class); + } + + // MaxProperties + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Integer getMaxProperties() { + return _get("maxProperties", Integer.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMaxProperties(Integer maxProperties) { + _setScalar("maxProperties", maxProperties, Integer.class); + } + + // MinProperties + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Integer getMinProperties() { + return _get("minProperties", Integer.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setMinProperties(Integer minProperties) { + _setScalar("minProperties", minProperties, Integer.class); + } + + // RequiredField + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getRequiredFields() { + return _getList("requiredFields", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getRequiredFields(boolean elaborate) { + return _getList("requiredFields", elaborate, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasRequiredFields() { + return _isPresent("requiredFields"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getRequiredField(int index) { + return _get("requiredFields", index, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequiredFields(List requiredFields) { + _setList("requiredFields", requiredFields, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequiredField(int index, String requiredField) { + _set("requiredFields", index, requiredField, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addRequiredField(String requiredField) { + _add("requiredFields", requiredField, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertRequiredField(int index, String requiredField) { + _insert("requiredFields", index, requiredField, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeRequiredField(int index) { + _remove("requiredFields", index, String.class); + } + + // Enum + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getEnums() { + return _getList("enums", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getEnums(boolean elaborate) { + return _getList("enums", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasEnums() { + return _isPresent("enums"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getEnum(int index) { + return _get("enums", index, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEnums(List enums) { + _setList("enums", enums, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEnum(int index, Object enumValue) { + _set("enums", index, enumValue, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addEnum(Object enumValue) { + _add("enums", enumValue, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertEnum(int index, Object enumValue) { + _insert("enums", index, enumValue, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeEnum(int index) { + _remove("enums", index, Object.class); + } + + // Type + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getType() { + return _get("type", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setType(String type) { + _setScalar("type", type, String.class); + } + + // AllOfSchema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getAllOfSchemas() { + return _getList("allOfSchemas", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getAllOfSchemas(boolean elaborate) { + return _getList("allOfSchemas", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasAllOfSchemas() { + return _isPresent("allOfSchemas"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getAllOfSchema(int index) { + return _get("allOfSchemas", index, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAllOfSchemas(List allOfSchemas) { + _setList("allOfSchemas", allOfSchemas, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAllOfSchema(int index, Schema allOfSchema) { + _set("allOfSchemas", index, allOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addAllOfSchema(Schema allOfSchema) { + _add("allOfSchemas", allOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertAllOfSchema(int index, Schema allOfSchema) { + _insert("allOfSchemas", index, allOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeAllOfSchema(int index) { + _remove("allOfSchemas", index, Schema.class); + } + + // OneOfSchema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getOneOfSchemas() { + return _getList("oneOfSchemas", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getOneOfSchemas(boolean elaborate) { + return _getList("oneOfSchemas", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasOneOfSchemas() { + return _isPresent("oneOfSchemas"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getOneOfSchema(int index) { + return _get("oneOfSchemas", index, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOneOfSchemas(List oneOfSchemas) { + _setList("oneOfSchemas", oneOfSchemas, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOneOfSchema(int index, Schema oneOfSchema) { + _set("oneOfSchemas", index, oneOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addOneOfSchema(Schema oneOfSchema) { + _add("oneOfSchemas", oneOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertOneOfSchema(int index, Schema oneOfSchema) { + _insert("oneOfSchemas", index, oneOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeOneOfSchema(int index) { + _remove("oneOfSchemas", index, Schema.class); + } + + // AnyOfSchema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getAnyOfSchemas() { + return _getList("anyOfSchemas", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getAnyOfSchemas(boolean elaborate) { + return _getList("anyOfSchemas", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasAnyOfSchemas() { + return _isPresent("anyOfSchemas"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getAnyOfSchema(int index) { + return _get("anyOfSchemas", index, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAnyOfSchemas(List anyOfSchemas) { + _setList("anyOfSchemas", anyOfSchemas, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAnyOfSchema(int index, Schema anyOfSchema) { + _set("anyOfSchemas", index, anyOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addAnyOfSchema(Schema anyOfSchema) { + _add("anyOfSchemas", anyOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertAnyOfSchema(int index, Schema anyOfSchema) { + _insert("anyOfSchemas", index, anyOfSchema, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeAnyOfSchema(int index) { + _remove("anyOfSchemas", index, Schema.class); + } + + // NotSchema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getNotSchema() { + return _get("notSchema", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getNotSchema(boolean elaborate) { + return _get("notSchema", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setNotSchema(Schema notSchema) { + _setScalar("notSchema", notSchema, Schema.class); + } + + // ItemsSchema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getItemsSchema() { + return _get("itemsSchema", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getItemsSchema(boolean elaborate) { + return _get("itemsSchema", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setItemsSchema(Schema itemsSchema) { + _setScalar("itemsSchema", itemsSchema, Schema.class); + } + + // Property + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getProperties() { + return _getMap("properties", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getProperties(boolean elaborate) { + return _getMap("properties", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasProperties() { + return _isPresent("properties"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasProperty(String name) { + return _getMap("properties", Schema.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getProperty(String name) { + return _get("properties", name, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setProperties(Map properties) { + _setMap("properties", properties, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setProperty(String name, Schema property) { + _set("properties", name, property, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeProperty(String name) { + _remove("properties", name, Schema.class); + } + + // AdditionalPropertiesSchema + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getAdditionalPropertiesSchema() { + return _get("additionalPropertiesSchema", Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Schema getAdditionalPropertiesSchema(boolean elaborate) { + return _get("additionalPropertiesSchema", elaborate, Schema.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAdditionalPropertiesSchema(Schema additionalPropertiesSchema) { + _setScalar("additionalPropertiesSchema", additionalPropertiesSchema, Schema.class); + } + + // AdditionalProperties + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getAdditionalProperties() { + return _get("additionalProperties", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isAdditionalProperties() { + Boolean bool = _get("additionalProperties", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAdditionalProperties(Boolean additionalProperties) { + _setScalar("additionalProperties", additionalProperties, Boolean.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Format + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getFormat() { + return _get("format", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setFormat(String format) { + _setScalar("format", format, String.class); + } + + // Default + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getDefault() { + return _get("defaultValue", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDefault(Object defaultValue) { + _setScalar("defaultValue", defaultValue, Object.class); + } + + // Nullable + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getNullable() { + return _get("nullable", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isNullable() { + Boolean bool = _get("nullable", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setNullable(Boolean nullable) { + _setScalar("nullable", nullable, Boolean.class); + } + + // Discriminator + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDiscriminator() { + return _get("discriminator", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDiscriminator(String discriminator) { + _setScalar("discriminator", discriminator, String.class); + } + + // ReadOnly + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getReadOnly() { + return _get("readOnly", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isReadOnly() { + Boolean bool = _get("readOnly", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setReadOnly(Boolean readOnly) { + _setScalar("readOnly", readOnly, Boolean.class); + } + + // WriteOnly + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getWriteOnly() { + return _get("writeOnly", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isWriteOnly() { + Boolean bool = _get("writeOnly", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setWriteOnly(Boolean writeOnly) { + _setScalar("writeOnly", writeOnly, Boolean.class); + } + + // Xml + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Xml getXml() { + return _get("xml", Xml.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Xml getXml(boolean elaborate) { + return _get("xml", elaborate, Xml.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setXml(Xml xml) { + _setScalar("xml", xml, Xml.class); + } + + // ExternalDocs + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs() { + return _get("externalDocs", ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs(boolean elaborate) { + return _get("externalDocs", elaborate, ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExternalDocs(ExternalDocs externalDocs) { + _setScalar("externalDocs", externalDocs, ExternalDocs.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples() { + return _getMap("examples", Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExamples(boolean elaborate) { + return _getMap("examples", elaborate, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExamples() { + return _isPresent("examples"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExample(String name) { + return _getMap("examples", Example.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Example getExample(String name) { + return _get("examples", name, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExamples(Map examples) { + _setMap("examples", examples, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(String name, Example example) { + _set("examples", name, example, Example.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExample(String name) { + _remove("examples", name, Example.class); + } + + // Example + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExample() { + return _get("example", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExample(Object example) { + _setScalar("example", example, Object.class); + } + + // Deprecated + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getDeprecated() { + return _get("deprecated", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isDeprecated() { + Boolean bool = _get("deprecated", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDeprecated(Boolean deprecated) { + _setScalar("deprecated", deprecated, Boolean.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("title", "title", StringOverlay.factory); + _createScalar("multipleOf", "multipleOf", NumberOverlay.factory); + _createScalar("maximum", "maximum", NumberOverlay.factory); + _createScalar("exclusiveMaximum", "exclusiveMaximum", BooleanOverlay.factory); + _createScalar("minimum", "minimum", NumberOverlay.factory); + _createScalar("exclusiveMinimum", "exclusiveMinimum", BooleanOverlay.factory); + _createScalar("maxLength", "maxLength", IntegerOverlay.factory); + _createScalar("minLength", "minLength", IntegerOverlay.factory); + _createScalar("pattern", "pattern", StringOverlay.factory); + _createScalar("maxItems", "maxItems", IntegerOverlay.factory); + _createScalar("minItems", "minItems", IntegerOverlay.factory); + _createScalar("uniqueItems", "uniqueItems", BooleanOverlay.factory); + _createScalar("maxProperties", "maxProperties", IntegerOverlay.factory); + _createScalar("minProperties", "minProperties", IntegerOverlay.factory); + _createList("requiredFields", "required", StringOverlay.factory); + _createList("enums", "enum", ObjectOverlay.factory); + _createScalar("type", "type", StringOverlay.factory); + _createList("allOfSchemas", "allOf", SchemaImpl.factory); + _createList("oneOfSchemas", "oneOf", SchemaImpl.factory); + _createList("anyOfSchemas", "anyOf", SchemaImpl.factory); + _createScalar("notSchema", "not", SchemaImpl.factory); + _createScalar("itemsSchema", "items", SchemaImpl.factory); + _createMap("properties", "properties", SchemaImpl.factory, null); + _createScalar("additionalPropertiesSchema", "additionalProperties", SchemaImpl.factory); + _createScalar("additionalProperties", "additionalProperties", BooleanOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("format", "format", StringOverlay.factory); + _createScalar("defaultValue", "default", ObjectOverlay.factory); + _createScalar("nullable", "nullable", BooleanOverlay.factory); + _createScalar("discriminator", "discriminator", StringOverlay.factory); + _createScalar("readOnly", "readOnly", BooleanOverlay.factory); + _createScalar("writeOnly", "writeOnly", BooleanOverlay.factory); + _createScalar("xml", "xml", XmlImpl.factory); + _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); + _createMap("examples", "examples", ExampleImpl.factory, "[a-zA-Z0-9\\._-]+"); + _createScalar("example", "example", ObjectOverlay.factory); + _createScalar("deprecated", "deprecated", BooleanOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return SchemaImpl.class; + } + + @Override + public JsonOverlay _create(Schema schema, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SchemaImpl(schema, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SchemaImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Schema schema) { + return Schema.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Schema.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityParameterImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityParameterImpl.java index 4ed11a96..7e948045 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityParameterImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityParameterImpl.java @@ -15,135 +15,135 @@ public class SecurityParameterImpl extends PropertiesOverlay implements SecurityParameter { - @Override - protected JsonNode _fixJson(JsonNode json) { - return json.isMissingNode() ? _jsonArray() : json; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityParameterImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityParameterImpl(SecurityParameter securityParameter, JsonOverlay parent, ReferenceManager refMgr) { - super(securityParameter, parent, factory, refMgr); - } - - // Parameter - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getParameters() { - return _getList("parameters", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getParameters(boolean elaborate) { - return _getList("parameters", elaborate, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasParameters() { - return _isPresent("parameters"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getParameter(int index) { - return _get("parameters", index, String.class); - } + @Override + protected JsonNode _fixJson(JsonNode json) { + return json.isMissingNode() ? _jsonArray() : json; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityParameterImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityParameterImpl(SecurityParameter securityParameter, JsonOverlay parent, ReferenceManager refMgr) { + super(securityParameter, parent, factory, refMgr); + } + + // Parameter + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getParameters() { + return _getList("parameters", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getParameters(boolean elaborate) { + return _getList("parameters", elaborate, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasParameters() { + return _isPresent("parameters"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getParameter(int index) { + return _get("parameters", index, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameters(List parameters) { + _setList("parameters", parameters, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setParameter(int index, String parameter) { + _set("parameters", index, parameter, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addParameter(String parameter) { + _add("parameters", parameter, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertParameter(int index, String parameter) { + _insert("parameters", index, parameter, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeParameter(int index) { + _remove("parameters", index, String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createList("parameters", "", StringOverlay.factory); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameters(List parameters) { - _setList("parameters", parameters, String.class); + protected Class> getOverlayClass() { + return SecurityParameterImpl.class; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setParameter(int index, String parameter) { - _set("parameters", index, parameter, String.class); + public JsonOverlay _create(SecurityParameter securityParameter, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SecurityParameterImpl(securityParameter, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addParameter(String parameter) { - _add("parameters", parameter, String.class); + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SecurityParameterImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertParameter(int index, String parameter) { - _insert("parameters", index, parameter, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeParameter(int index) { - _remove("parameters", index, String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createList("parameters", "", StringOverlay.factory); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return SecurityParameterImpl.class; - } - - @Override - public JsonOverlay _create(SecurityParameter securityParameter, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SecurityParameterImpl(securityParameter, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SecurityParameterImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(SecurityParameter securityParameter) { - return SecurityParameter.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return SecurityParameter.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(SecurityParameter securityParameter) { + return SecurityParameter.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return SecurityParameter.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityRequirementImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityRequirementImpl.java index 7846ffa6..d7fa3d31 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityRequirementImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecurityRequirementImpl.java @@ -15,125 +15,125 @@ public class SecurityRequirementImpl extends PropertiesOverlay implements SecurityRequirement { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityRequirementImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityRequirementImpl(SecurityRequirement securityRequirement, JsonOverlay parent, - ReferenceManager refMgr) { - super(securityRequirement, parent, factory, refMgr); - } - - // Requirement - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getRequirements() { - return _getMap("requirements", SecurityParameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getRequirements(boolean elaborate) { - return _getMap("requirements", elaborate, SecurityParameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasRequirements() { - return _isPresent("requirements"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasRequirement(String name) { - return _getMap("requirements", SecurityParameter.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecurityParameter getRequirement(String name) { - return _get("requirements", name, SecurityParameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequirements(Map requirements) { - _setMap("requirements", requirements, SecurityParameter.class); - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityRequirementImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityRequirementImpl(SecurityRequirement securityRequirement, JsonOverlay parent, + ReferenceManager refMgr) { + super(securityRequirement, parent, factory, refMgr); + } + + // Requirement + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getRequirements() { + return _getMap("requirements", SecurityParameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getRequirements(boolean elaborate) { + return _getMap("requirements", elaborate, SecurityParameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasRequirements() { + return _isPresent("requirements"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasRequirement(String name) { + return _getMap("requirements", SecurityParameter.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecurityParameter getRequirement(String name) { + return _get("requirements", name, SecurityParameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequirements(Map requirements) { + _setMap("requirements", requirements, SecurityParameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setRequirement(String name, SecurityParameter requirement) { + _set("requirements", name, requirement, SecurityParameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeRequirement(String name) { + _remove("requirements", name, SecurityParameter.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createMap("requirements", "", SecurityParameterImpl.factory, "[a-zA-Z0-9\\._-]+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setRequirement(String name, SecurityParameter requirement) { - _set("requirements", name, requirement, SecurityParameter.class); + protected Class> getOverlayClass() { + return SecurityRequirementImpl.class; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeRequirement(String name) { - _remove("requirements", name, SecurityParameter.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createMap("requirements", "", SecurityParameterImpl.factory, "[a-zA-Z0-9\\._-]+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return SecurityRequirementImpl.class; - } - - @Override - public JsonOverlay _create(SecurityRequirement securityRequirement, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SecurityRequirementImpl(securityRequirement, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SecurityRequirementImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(SecurityRequirement securityRequirement) { - return SecurityRequirement.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return SecurityRequirement.class; + public JsonOverlay _create(SecurityRequirement securityRequirement, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SecurityRequirementImpl(securityRequirement, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SecurityRequirementImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; + protected boolean isExtendedType() { + return false; } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(SecurityRequirement securityRequirement) { + return SecurityRequirement.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return SecurityRequirement.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecuritySchemeImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecuritySchemeImpl.java index 80e92a09..32d19530 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecuritySchemeImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/SecuritySchemeImpl.java @@ -19,359 +19,359 @@ public class SecuritySchemeImpl extends PropertiesOverlay implements SecurityScheme { - private Overlay overlay = Overlay.of(this); - - @Override - public String getKey() { - return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecuritySchemeImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public SecuritySchemeImpl(SecurityScheme securityScheme, JsonOverlay parent, ReferenceManager refMgr) { - super(securityScheme, parent, factory, refMgr); - } - - // Type - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getType() { - return _get("type", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setType(String type) { - _setScalar("type", type, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // In - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getIn() { - return _get("in", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setIn(String in) { - _setScalar("in", in, String.class); - } - - // Scheme - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getScheme() { - return _get("scheme", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setScheme(String scheme) { - _setScalar("scheme", scheme, String.class); - } - - // BearerFormat - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getBearerFormat() { - return _get("bearerFormat", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setBearerFormat(String bearerFormat) { - _setScalar("bearerFormat", bearerFormat, String.class); - } - - // ImplicitOAuthFlow - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getImplicitOAuthFlow() { - return _get("implicitOAuthFlow", OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getImplicitOAuthFlow(boolean elaborate) { - return _get("implicitOAuthFlow", elaborate, OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setImplicitOAuthFlow(OAuthFlow implicitOAuthFlow) { - _setScalar("implicitOAuthFlow", implicitOAuthFlow, OAuthFlow.class); - } - - // PasswordOAuthFlow - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getPasswordOAuthFlow() { - return _get("passwordOAuthFlow", OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getPasswordOAuthFlow(boolean elaborate) { - return _get("passwordOAuthFlow", elaborate, OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPasswordOAuthFlow(OAuthFlow passwordOAuthFlow) { - _setScalar("passwordOAuthFlow", passwordOAuthFlow, OAuthFlow.class); - } - - // ClientCredentialsOAuthFlow - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getClientCredentialsOAuthFlow() { - return _get("clientCredentialsOAuthFlow", OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getClientCredentialsOAuthFlow(boolean elaborate) { - return _get("clientCredentialsOAuthFlow", elaborate, OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setClientCredentialsOAuthFlow(OAuthFlow clientCredentialsOAuthFlow) { - _setScalar("clientCredentialsOAuthFlow", clientCredentialsOAuthFlow, OAuthFlow.class); - } - - // AuthorizationCodeOAuthFlow - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getAuthorizationCodeOAuthFlow() { - return _get("authorizationCodeOAuthFlow", OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public OAuthFlow getAuthorizationCodeOAuthFlow(boolean elaborate) { - return _get("authorizationCodeOAuthFlow", elaborate, OAuthFlow.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAuthorizationCodeOAuthFlow(OAuthFlow authorizationCodeOAuthFlow) { - _setScalar("authorizationCodeOAuthFlow", authorizationCodeOAuthFlow, OAuthFlow.class); - } - - // OAuthFlowsExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getOAuthFlowsExtensions() { - return _getMap("oAuthFlowsExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getOAuthFlowsExtensions(boolean elaborate) { - return _getMap("oAuthFlowsExtensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasOAuthFlowsExtensions() { - return _isPresent("oAuthFlowsExtensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasOAuthFlowsExtension(String name) { - return _getMap("oAuthFlowsExtensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getOAuthFlowsExtension(String name) { - return _get("oAuthFlowsExtensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOAuthFlowsExtensions(Map oAuthFlowsExtensions) { - _setMap("oAuthFlowsExtensions", oAuthFlowsExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOAuthFlowsExtension(String name, Object oAuthFlowsExtension) { - _set("oAuthFlowsExtensions", name, oAuthFlowsExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeOAuthFlowsExtension(String name) { - _remove("oAuthFlowsExtensions", name, Object.class); - } - - // OpenIdConnectUrl - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getOpenIdConnectUrl() { - return _get("openIdConnectUrl", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setOpenIdConnectUrl(String openIdConnectUrl) { - _setScalar("openIdConnectUrl", openIdConnectUrl, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("type", "type", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("in", "in", StringOverlay.factory); - _createScalar("scheme", "scheme", StringOverlay.factory); - _createScalar("bearerFormat", "bearerFormat", StringOverlay.factory); - _createScalar("implicitOAuthFlow", "flow/implicit", OAuthFlowImpl.factory); - _createScalar("passwordOAuthFlow", "flow/password", OAuthFlowImpl.factory); - _createScalar("clientCredentialsOAuthFlow", "flow/clientCredentials", OAuthFlowImpl.factory); - _createScalar("authorizationCodeOAuthFlow", "flow/authorizationCode", OAuthFlowImpl.factory); - _createMap("oAuthFlowsExtensions", "flow", ObjectOverlay.factory, "x-.+"); - _createScalar("openIdConnectUrl", "openIdConnectUrl", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return SecuritySchemeImpl.class; - } - - @Override - public JsonOverlay _create(SecurityScheme securityScheme, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SecuritySchemeImpl(securityScheme, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new SecuritySchemeImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(SecurityScheme securityScheme) { - return SecurityScheme.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return SecurityScheme.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + private Overlay overlay = Overlay.of(this); + + @Override + public String getKey() { + return overlay.getParent() instanceof MapOverlay ? overlay.getPathInParent() : null; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecuritySchemeImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public SecuritySchemeImpl(SecurityScheme securityScheme, JsonOverlay parent, ReferenceManager refMgr) { + super(securityScheme, parent, factory, refMgr); + } + + // Type + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getType() { + return _get("type", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setType(String type) { + _setScalar("type", type, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // In + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getIn() { + return _get("in", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setIn(String in) { + _setScalar("in", in, String.class); + } + + // Scheme + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getScheme() { + return _get("scheme", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setScheme(String scheme) { + _setScalar("scheme", scheme, String.class); + } + + // BearerFormat + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getBearerFormat() { + return _get("bearerFormat", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setBearerFormat(String bearerFormat) { + _setScalar("bearerFormat", bearerFormat, String.class); + } + + // ImplicitOAuthFlow + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getImplicitOAuthFlow() { + return _get("implicitOAuthFlow", OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getImplicitOAuthFlow(boolean elaborate) { + return _get("implicitOAuthFlow", elaborate, OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setImplicitOAuthFlow(OAuthFlow implicitOAuthFlow) { + _setScalar("implicitOAuthFlow", implicitOAuthFlow, OAuthFlow.class); + } + + // PasswordOAuthFlow + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getPasswordOAuthFlow() { + return _get("passwordOAuthFlow", OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getPasswordOAuthFlow(boolean elaborate) { + return _get("passwordOAuthFlow", elaborate, OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPasswordOAuthFlow(OAuthFlow passwordOAuthFlow) { + _setScalar("passwordOAuthFlow", passwordOAuthFlow, OAuthFlow.class); + } + + // ClientCredentialsOAuthFlow + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getClientCredentialsOAuthFlow() { + return _get("clientCredentialsOAuthFlow", OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getClientCredentialsOAuthFlow(boolean elaborate) { + return _get("clientCredentialsOAuthFlow", elaborate, OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setClientCredentialsOAuthFlow(OAuthFlow clientCredentialsOAuthFlow) { + _setScalar("clientCredentialsOAuthFlow", clientCredentialsOAuthFlow, OAuthFlow.class); + } + + // AuthorizationCodeOAuthFlow + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getAuthorizationCodeOAuthFlow() { + return _get("authorizationCodeOAuthFlow", OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public OAuthFlow getAuthorizationCodeOAuthFlow(boolean elaborate) { + return _get("authorizationCodeOAuthFlow", elaborate, OAuthFlow.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAuthorizationCodeOAuthFlow(OAuthFlow authorizationCodeOAuthFlow) { + _setScalar("authorizationCodeOAuthFlow", authorizationCodeOAuthFlow, OAuthFlow.class); + } + + // OAuthFlowsExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getOAuthFlowsExtensions() { + return _getMap("oAuthFlowsExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getOAuthFlowsExtensions(boolean elaborate) { + return _getMap("oAuthFlowsExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasOAuthFlowsExtensions() { + return _isPresent("oAuthFlowsExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasOAuthFlowsExtension(String name) { + return _getMap("oAuthFlowsExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getOAuthFlowsExtension(String name) { + return _get("oAuthFlowsExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOAuthFlowsExtensions(Map oAuthFlowsExtensions) { + _setMap("oAuthFlowsExtensions", oAuthFlowsExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOAuthFlowsExtension(String name, Object oAuthFlowsExtension) { + _set("oAuthFlowsExtensions", name, oAuthFlowsExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeOAuthFlowsExtension(String name) { + _remove("oAuthFlowsExtensions", name, Object.class); + } + + // OpenIdConnectUrl + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getOpenIdConnectUrl() { + return _get("openIdConnectUrl", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setOpenIdConnectUrl(String openIdConnectUrl) { + _setScalar("openIdConnectUrl", openIdConnectUrl, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("type", "type", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("in", "in", StringOverlay.factory); + _createScalar("scheme", "scheme", StringOverlay.factory); + _createScalar("bearerFormat", "bearerFormat", StringOverlay.factory); + _createScalar("implicitOAuthFlow", "flow/implicit", OAuthFlowImpl.factory); + _createScalar("passwordOAuthFlow", "flow/password", OAuthFlowImpl.factory); + _createScalar("clientCredentialsOAuthFlow", "flow/clientCredentials", OAuthFlowImpl.factory); + _createScalar("authorizationCodeOAuthFlow", "flow/authorizationCode", OAuthFlowImpl.factory); + _createMap("oAuthFlowsExtensions", "flow", ObjectOverlay.factory, "x-.+"); + _createScalar("openIdConnectUrl", "openIdConnectUrl", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return SecuritySchemeImpl.class; + } + + @Override + public JsonOverlay _create(SecurityScheme securityScheme, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SecuritySchemeImpl(securityScheme, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new SecuritySchemeImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(SecurityScheme securityScheme) { + return SecurityScheme.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return SecurityScheme.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerImpl.java index e7987724..df03f0ad 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerImpl.java @@ -17,251 +17,251 @@ public class ServerImpl extends PropertiesOverlay implements Server { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ServerImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ServerImpl(Server server, JsonOverlay parent, ReferenceManager refMgr) { - super(server, parent, factory, refMgr); - } - - // Url - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getUrl() { - return _get("url", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setUrl(String url) { - _setScalar("url", url, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // ServerVariable - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getServerVariables() { - return _getMap("serverVariables", ServerVariable.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getServerVariables(boolean elaborate) { - return _getMap("serverVariables", elaborate, ServerVariable.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasServerVariables() { - return _isPresent("serverVariables"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasServerVariable(String name) { - return _getMap("serverVariables", ServerVariable.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ServerVariable getServerVariable(String name) { - return _get("serverVariables", name, ServerVariable.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServerVariables(Map serverVariables) { - _setMap("serverVariables", serverVariables, ServerVariable.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setServerVariable(String name, ServerVariable serverVariable) { - _set("serverVariables", name, serverVariable, ServerVariable.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeServerVariable(String name) { - _remove("serverVariables", name, ServerVariable.class); - } - - // VariablesExtension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getVariablesExtensions() { - return _getMap("variablesExtensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getVariablesExtensions(boolean elaborate) { - return _getMap("variablesExtensions", elaborate, Object.class); - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ServerImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ServerImpl(Server server, JsonOverlay parent, ReferenceManager refMgr) { + super(server, parent, factory, refMgr); + } + + // Url + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getUrl() { + return _get("url", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setUrl(String url) { + _setScalar("url", url, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // ServerVariable + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getServerVariables() { + return _getMap("serverVariables", ServerVariable.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getServerVariables(boolean elaborate) { + return _getMap("serverVariables", elaborate, ServerVariable.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasServerVariables() { + return _isPresent("serverVariables"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasServerVariable(String name) { + return _getMap("serverVariables", ServerVariable.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ServerVariable getServerVariable(String name) { + return _get("serverVariables", name, ServerVariable.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServerVariables(Map serverVariables) { + _setMap("serverVariables", serverVariables, ServerVariable.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setServerVariable(String name, ServerVariable serverVariable) { + _set("serverVariables", name, serverVariable, ServerVariable.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeServerVariable(String name) { + _remove("serverVariables", name, ServerVariable.class); + } + + // VariablesExtension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getVariablesExtensions() { + return _getMap("variablesExtensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getVariablesExtensions(boolean elaborate) { + return _getMap("variablesExtensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasVariablesExtensions() { + return _isPresent("variablesExtensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasVariablesExtension(String name) { + return _getMap("variablesExtensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getVariablesExtension(String name) { + return _get("variablesExtensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setVariablesExtensions(Map variablesExtensions) { + _setMap("variablesExtensions", variablesExtensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setVariablesExtension(String name, Object variablesExtension) { + _set("variablesExtensions", name, variablesExtension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeVariablesExtension(String name) { + _remove("variablesExtensions", name, Object.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("url", "url", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createMap("serverVariables", "variables", ServerVariableImpl.factory, "(?!x-)[a-zA-Z0-9\\._-]+"); + _createMap("variablesExtensions", "variables", ObjectOverlay.factory, "x-.+"); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasVariablesExtensions() { - return _isPresent("variablesExtensions"); + protected Class> getOverlayClass() { + return ServerImpl.class; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasVariablesExtension(String name) { - return _getMap("variablesExtensions", Object.class).containsKey(name); + public JsonOverlay _create(Server server, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ServerImpl(server, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getVariablesExtension(String name) { - return _get("variablesExtensions", name, Object.class); + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ServerImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; } @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setVariablesExtensions(Map variablesExtensions) { - _setMap("variablesExtensions", variablesExtensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setVariablesExtension(String name, Object variablesExtension) { - _set("variablesExtensions", name, variablesExtension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeVariablesExtension(String name) { - _remove("variablesExtensions", name, Object.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("url", "url", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createMap("serverVariables", "variables", ServerVariableImpl.factory, "(?!x-)[a-zA-Z0-9\\._-]+"); - _createMap("variablesExtensions", "variables", ObjectOverlay.factory, "x-.+"); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ServerImpl.class; - } - - @Override - public JsonOverlay _create(Server server, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ServerImpl(server, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ServerImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Server server) { - return Server.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Server.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Server server) { + return Server.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Server.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerVariableImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerVariableImpl.java index a82acd53..24ec34ff 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerVariableImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/ServerVariableImpl.java @@ -18,208 +18,208 @@ public class ServerVariableImpl extends PropertiesOverlay implements ServerVariable { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ServerVariableImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ServerVariableImpl(ServerVariable serverVariable, JsonOverlay parent, ReferenceManager refMgr) { - super(serverVariable, parent, factory, refMgr); - } - - // EnumValue - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getEnumValues() { - return _getList("enumValues", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public List getEnumValues(boolean elaborate) { - return _getList("enumValues", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasEnumValues() { - return _isPresent("enumValues"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getEnumValue(int index) { - return _get("enumValues", index, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEnumValues(List enumValues) { - _setList("enumValues", enumValues, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setEnumValue(int index, Object enumValue) { - _set("enumValues", index, enumValue, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void addEnumValue(Object enumValue) { - _add("enumValues", enumValue, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void insertEnumValue(int index, Object enumValue) { - _insert("enumValues", index, enumValue, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeEnumValue(int index) { - _remove("enumValues", index, Object.class); - } - - // Default - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getDefault() { - return _get("defaultValue", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDefault(Object defaultValue) { - _setScalar("defaultValue", defaultValue, Object.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createList("enumValues", "enum", PrimitiveOverlay.factory); - _createScalar("defaultValue", "default", PrimitiveOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return ServerVariableImpl.class; - } - - @Override - public JsonOverlay _create(ServerVariable serverVariable, JsonOverlay parent, - ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ServerVariableImpl(serverVariable, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new ServerVariableImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(ServerVariable serverVariable) { - return ServerVariable.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return ServerVariable.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ServerVariableImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ServerVariableImpl(ServerVariable serverVariable, JsonOverlay parent, ReferenceManager refMgr) { + super(serverVariable, parent, factory, refMgr); + } + + // EnumValue + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getEnumValues() { + return _getList("enumValues", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public List getEnumValues(boolean elaborate) { + return _getList("enumValues", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasEnumValues() { + return _isPresent("enumValues"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getEnumValue(int index) { + return _get("enumValues", index, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEnumValues(List enumValues) { + _setList("enumValues", enumValues, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setEnumValue(int index, Object enumValue) { + _set("enumValues", index, enumValue, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void addEnumValue(Object enumValue) { + _add("enumValues", enumValue, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void insertEnumValue(int index, Object enumValue) { + _insert("enumValues", index, enumValue, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeEnumValue(int index) { + _remove("enumValues", index, Object.class); + } + + // Default + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getDefault() { + return _get("defaultValue", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDefault(Object defaultValue) { + _setScalar("defaultValue", defaultValue, Object.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createList("enumValues", "enum", PrimitiveOverlay.factory); + _createScalar("defaultValue", "default", PrimitiveOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return ServerVariableImpl.class; + } + + @Override + public JsonOverlay _create(ServerVariable serverVariable, JsonOverlay parent, + ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ServerVariableImpl(serverVariable, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new ServerVariableImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(ServerVariable serverVariable) { + return ServerVariable.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return ServerVariable.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/TagImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/TagImpl.java index f1ca1fc3..aab64c14 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/TagImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/TagImpl.java @@ -17,171 +17,171 @@ public class TagImpl extends PropertiesOverlay implements Tag { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public TagImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public TagImpl(Tag tag, JsonOverlay parent, ReferenceManager refMgr) { - super(tag, parent, factory, refMgr); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // Description - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getDescription() { - return _get("description", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setDescription(String description) { - _setScalar("description", description, String.class); - } - - // ExternalDocs - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs() { - return _get("externalDocs", ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public ExternalDocs getExternalDocs(boolean elaborate) { - return _get("externalDocs", elaborate, ExternalDocs.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExternalDocs(ExternalDocs externalDocs) { - _setScalar("externalDocs", externalDocs, ExternalDocs.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("description", "description", StringOverlay.factory); - _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return TagImpl.class; - } - - @Override - public JsonOverlay _create(Tag tag, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new TagImpl(tag, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new TagImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Tag tag) { - return Tag.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Tag.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public TagImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public TagImpl(Tag tag, JsonOverlay parent, ReferenceManager refMgr) { + super(tag, parent, factory, refMgr); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // Description + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getDescription() { + return _get("description", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setDescription(String description) { + _setScalar("description", description, String.class); + } + + // ExternalDocs + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs() { + return _get("externalDocs", ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public ExternalDocs getExternalDocs(boolean elaborate) { + return _get("externalDocs", elaborate, ExternalDocs.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExternalDocs(ExternalDocs externalDocs) { + _setScalar("externalDocs", externalDocs, ExternalDocs.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("description", "description", StringOverlay.factory); + _createScalar("externalDocs", "externalDocs", ExternalDocsImpl.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return TagImpl.class; + } + + @Override + public JsonOverlay _create(Tag tag, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new TagImpl(tag, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new TagImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Tag tag) { + return Tag.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Tag.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/XmlImpl.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/XmlImpl.java index 00048be3..a3f67a9c 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/XmlImpl.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/ovl3/XmlImpl.java @@ -17,207 +17,207 @@ public class XmlImpl extends PropertiesOverlay implements Xml { - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public XmlImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - super(json, parent, factory, refMgr); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public XmlImpl(Xml xml, JsonOverlay parent, ReferenceManager refMgr) { - super(xml, parent, factory, refMgr); - } - - // Name - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getName() { - return _get("name", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setName(String name) { - _setScalar("name", name, String.class); - } - - // Namespace - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getNamespace() { - return _get("namespace", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setNamespace(String namespace) { - _setScalar("namespace", namespace, String.class); - } - - // Prefix - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public String getPrefix() { - return _get("prefix", String.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setPrefix(String prefix) { - _setScalar("prefix", prefix, String.class); - } - - // Attribute - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getAttribute() { - return _get("attribute", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isAttribute() { - Boolean bool = _get("attribute", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setAttribute(Boolean attribute) { - _setScalar("attribute", attribute, Boolean.class); - } - - // Wrapped - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Boolean getWrapped() { - return _get("wrapped", Boolean.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean isWrapped() { - Boolean bool = _get("wrapped", Boolean.class); - return bool != null ? bool : false; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setWrapped(Boolean wrapped) { - _setScalar("wrapped", wrapped, Boolean.class); - } - - // Extension - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions() { - return _getMap("extensions", Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Map getExtensions(boolean elaborate) { - return _getMap("extensions", elaborate, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtensions() { - return _isPresent("extensions"); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public boolean hasExtension(String name) { - return _getMap("extensions", Object.class).containsKey(name); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Object getExtension(String name) { - return _get("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtensions(Map extensions) { - _setMap("extensions", extensions, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void setExtension(String name, Object extension) { - _set("extensions", name, extension, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public void removeExtension(String name) { - _remove("extensions", name, Object.class); - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected void _elaborateJson() { - super._elaborateJson(); - _createScalar("name", "name", StringOverlay.factory); - _createScalar("namespace", "namespace", StringOverlay.factory); - _createScalar("prefix", "prefix", StringOverlay.factory); - _createScalar("attribute", "attribute", BooleanOverlay.factory); - _createScalar("wrapped", "wrapped", BooleanOverlay.factory); - _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public static OverlayFactory factory = new OverlayFactory() { - - @Override - protected Class> getOverlayClass() { - return XmlImpl.class; - } - - @Override - public JsonOverlay _create(Xml xml, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new XmlImpl(xml, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { - JsonOverlay overlay; - overlay = new XmlImpl(json, parent, refMgr); - @SuppressWarnings("unchecked") - JsonOverlay castOverlay = (JsonOverlay) overlay; - return castOverlay; - } - - @Override - protected boolean isExtendedType() { - return false; - } - }; - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(Xml xml) { - return Xml.class; - } - - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - private static Class getSubtypeOf(JsonNode json) { - return Xml.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - public Class _getModelType() { - return OpenApi3.class; - } - - @Override - @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") - protected OverlayFactory _getFactory() { - return factory; - } + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public XmlImpl(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + super(json, parent, factory, refMgr); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public XmlImpl(Xml xml, JsonOverlay parent, ReferenceManager refMgr) { + super(xml, parent, factory, refMgr); + } + + // Name + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getName() { + return _get("name", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setName(String name) { + _setScalar("name", name, String.class); + } + + // Namespace + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getNamespace() { + return _get("namespace", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setNamespace(String namespace) { + _setScalar("namespace", namespace, String.class); + } + + // Prefix + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public String getPrefix() { + return _get("prefix", String.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setPrefix(String prefix) { + _setScalar("prefix", prefix, String.class); + } + + // Attribute + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getAttribute() { + return _get("attribute", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isAttribute() { + Boolean bool = _get("attribute", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setAttribute(Boolean attribute) { + _setScalar("attribute", attribute, Boolean.class); + } + + // Wrapped + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Boolean getWrapped() { + return _get("wrapped", Boolean.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean isWrapped() { + Boolean bool = _get("wrapped", Boolean.class); + return bool != null ? bool : false; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setWrapped(Boolean wrapped) { + _setScalar("wrapped", wrapped, Boolean.class); + } + + // Extension + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions() { + return _getMap("extensions", Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Map getExtensions(boolean elaborate) { + return _getMap("extensions", elaborate, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtensions() { + return _isPresent("extensions"); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public boolean hasExtension(String name) { + return _getMap("extensions", Object.class).containsKey(name); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Object getExtension(String name) { + return _get("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtensions(Map extensions) { + _setMap("extensions", extensions, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void setExtension(String name, Object extension) { + _set("extensions", name, extension, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public void removeExtension(String name) { + _remove("extensions", name, Object.class); + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected void _elaborateJson() { + super._elaborateJson(); + _createScalar("name", "name", StringOverlay.factory); + _createScalar("namespace", "namespace", StringOverlay.factory); + _createScalar("prefix", "prefix", StringOverlay.factory); + _createScalar("attribute", "attribute", BooleanOverlay.factory); + _createScalar("wrapped", "wrapped", BooleanOverlay.factory); + _createMap("extensions", "", ObjectOverlay.factory, "x-.+"); + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public static OverlayFactory factory = new OverlayFactory() { + + @Override + protected Class> getOverlayClass() { + return XmlImpl.class; + } + + @Override + public JsonOverlay _create(Xml xml, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new XmlImpl(xml, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + public JsonOverlay _create(JsonNode json, JsonOverlay parent, ReferenceManager refMgr) { + JsonOverlay overlay; + overlay = new XmlImpl(json, parent, refMgr); + @SuppressWarnings("unchecked") + JsonOverlay castOverlay = (JsonOverlay) overlay; + return castOverlay; + } + + @Override + protected boolean isExtendedType() { + return false; + } + }; + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(Xml xml) { + return Xml.class; + } + + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + private static Class getSubtypeOf(JsonNode json) { + return Xml.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + public Class _getModelType() { + return OpenApi3.class; + } + + @Override + @Generated("com.reprezen.jsonoverlay.gen.CodeGenerator") + protected OverlayFactory _getFactory() { + return factory; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/AnyObjectValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/AnyObjectValidator.java index 4d0728a1..5ecbcac5 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/AnyObjectValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/AnyObjectValidator.java @@ -16,7 +16,7 @@ public class AnyObjectValidator extends OverlayValidator { @Override public void validate(ObjectOverlay overlay, ValidationResults results) { - super.validate(overlay, results); + super.validate(overlay, results); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/BooleanValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/BooleanValidator.java index 6cf0e7fa..db53bf0e 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/BooleanValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/BooleanValidator.java @@ -17,6 +17,6 @@ public class BooleanValidator extends OverlayValidator { @Override public void validate(BooleanOverlay overlay, ValidationResults results) { - super.validate(overlay, results, BooleanNode.class); + super.validate(overlay, results, BooleanNode.class); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/IntegerValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/IntegerValidator.java index 8acf600f..4c9cdb45 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/IntegerValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/IntegerValidator.java @@ -22,11 +22,11 @@ public class IntegerValidator extends OverlayValidator { @SuppressWarnings("unchecked") - private static Set> intTypes = Sets.> newHashSet( // - IntNode.class, ShortNode.class, BigIntegerNode.class); + private static Set> intTypes = Sets.>newHashSet( // + IntNode.class, ShortNode.class, BigIntegerNode.class); @Override public void validate(IntegerOverlay overlay, ValidationResults results) { - super.validate(overlay, results, intTypes); + super.validate(overlay, results, intTypes); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ListValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ListValidator.java index 8c731f55..909c8f68 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ListValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ListValidator.java @@ -16,21 +16,21 @@ public class ListValidator> extends OverlayValidator> { - Validator elementValidator; + Validator elementValidator; - public ListValidator(Validator elementeValidator) { - this.elementValidator = elementeValidator; - } + public ListValidator(Validator elementeValidator) { + this.elementValidator = elementeValidator; + } - @Override - public void validate(ListOverlay overlay, ValidationResults results) { - int i = 0; - for (T value : Overlay.get(overlay)) { - elementValidator.validate(value, results, getElementCrumb(i++)); - } + @Override + public void validate(ListOverlay overlay, ValidationResults results) { + int i = 0; + for (T value : Overlay.get(overlay)) { + elementValidator.validate(value, results, getElementCrumb(i++)); } + } - protected String getElementCrumb(int index) { - return "[" + index + "]"; - } + protected String getElementCrumb(int index) { + return "[" + index + "]"; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/MapValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/MapValidator.java index e1265e90..bb1cc381 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/MapValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/MapValidator.java @@ -17,17 +17,17 @@ public class MapValidator> extends OverlayValidator> { - private Validator elementValidator; + private Validator elementValidator; - public MapValidator(Validator elementValidator) { - this.elementValidator = elementValidator; - } + public MapValidator(Validator elementValidator) { + this.elementValidator = elementValidator; + } - @Override - public void validate(MapOverlay overlay, ValidationResults results) { - super.validate(overlay, results, ObjectNode.class); - for (T value : Overlay.get(overlay).values()) { - elementValidator.validate(value, results, Overlay.getPathInParent(value)); - } + @Override + public void validate(MapOverlay overlay, ValidationResults results) { + super.validate(overlay, results, ObjectNode.class); + for (T value : Overlay.get(overlay).values()) { + elementValidator.validate(value, results, Overlay.getPathInParent(value)); } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/Messages.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/Messages.java index c84a397e..2c2a96df 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/Messages.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/Messages.java @@ -16,15 +16,15 @@ public class Messages { public static Messages m = new Messages(); public String msg(String text, Object... args) { - int pos = text.indexOf('|'); - if (pos >= 0) { - String nls = nls(text.substring(0, pos)); - text = nls != null ? nls : text.substring(pos + 1); - } - return String.format("%s %s", text, Arrays.asList(args)); + int pos = text.indexOf('|'); + if (pos >= 0) { + String nls = nls(text.substring(0, pos)); + text = nls != null ? nls : text.substring(pos + 1); + } + return String.format("%s %s", text, Arrays.asList(args)); } public String nls(String text) { - return null; + return null; } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumberValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumberValidator.java index 2650f6b7..10ec5f3f 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumberValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumberValidator.java @@ -17,7 +17,7 @@ public class NumberValidator extends OverlayValidator { @Override public void validate(NumberOverlay overlay, ValidationResults results) { - super.validate(overlay, results, NumericNode.class); + super.validate(overlay, results, NumericNode.class); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumericUtils.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumericUtils.java index 5b1d2152..89df1194 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumericUtils.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/NumericUtils.java @@ -19,132 +19,132 @@ public class NumericUtils { public static boolean isNumeric(Object obj) { - return NumericType.of(obj) != null; + return NumericType.of(obj) != null; } public static boolean isIntegral(Object obj) { - switch (NumericType.of(obj)) { - case BIG_INTEGER: - case BYTE: - case INTEGER: - case LONG: - case SHORT: - return true; - default: - return false; - } + switch (NumericType.of(obj)) { + case BIG_INTEGER: + case BYTE: + case INTEGER: + case LONG: + case SHORT: + return true; + default: + return false; + } } public static T zero(T value) { - Number result; - switch (NumericType.of(value)) { - case BIG_DECIMAL: - result = BigDecimal.ZERO; - break; - case BIG_INTEGER: - result = BigInteger.ZERO; - break; - case BYTE: - result = Byte.valueOf((byte) 0); - break; - case DOUBLE: - result = Double.valueOf(0.0); - break; - case FLOAT: - result = Float.valueOf(0.0f); - break; - case INTEGER: - result = Integer.valueOf(0); - break; - case LONG: - result = Long.valueOf(0L); - break; - case SHORT: - result = Short.valueOf((short) 0); - break; - default: - return null; // shouldn't ever happen - } - @SuppressWarnings("unchecked") - T tResult = (T) result; - return tResult; + Number result; + switch (NumericType.of(value)) { + case BIG_DECIMAL: + result = BigDecimal.ZERO; + break; + case BIG_INTEGER: + result = BigInteger.ZERO; + break; + case BYTE: + result = Byte.valueOf((byte) 0); + break; + case DOUBLE: + result = Double.valueOf(0.0); + break; + case FLOAT: + result = Float.valueOf(0.0f); + break; + case INTEGER: + result = Integer.valueOf(0); + break; + case LONG: + result = Long.valueOf(0L); + break; + case SHORT: + result = Short.valueOf((short) 0); + break; + default: + return null; // shouldn't ever happen + } + @SuppressWarnings("unchecked") + T tResult = (T) result; + return tResult; } public static boolean gt(T x, T y) { - return compare(x, y) > 0; + return compare(x, y) > 0; } public static boolean ge(T x, T y) { - return compare(x, y) >= 0; + return compare(x, y) >= 0; } public static boolean lt(T x, T y) { - return compare(x, y) < 0; + return compare(x, y) < 0; } public static boolean le(T x, T y) { - return compare(x, y) <= 0; + return compare(x, y) <= 0; } public static boolean eq(T x, T y) { - return compare(x, y) == 0; + return compare(x, y) == 0; } public static boolean ne(T x, T y) { - return compare(x, y) != 0; + return compare(x, y) != 0; } public static int compare(T x, T y) { - NumericType type = NumericType.of(x); - if (type != NumericType.of(y)) { - throw new IllegalArgumentException(); - } - switch (type) { - case BIG_DECIMAL: - return ((BigDecimal) x).compareTo((BigDecimal) y); - case BIG_INTEGER: - return ((BigInteger) x).compareTo((BigInteger) y); - case BYTE: - return ((Byte) x).compareTo((Byte) y); - case DOUBLE: - return ((Double) x).compareTo((Double) y); - case FLOAT: - return ((Float) x).compareTo((Float) y); - case INTEGER: - return ((Integer) x).compareTo((Integer) y); - case LONG: - return ((Long) x).compareTo((Long) y); - case SHORT: - return ((Short) x).compareTo((Short) y); - default: - throw new IllegalArgumentException(); - } + NumericType type = NumericType.of(x); + if (type != NumericType.of(y)) { + throw new IllegalArgumentException(); + } + switch (type) { + case BIG_DECIMAL: + return ((BigDecimal) x).compareTo((BigDecimal) y); + case BIG_INTEGER: + return ((BigInteger) x).compareTo((BigInteger) y); + case BYTE: + return ((Byte) x).compareTo((Byte) y); + case DOUBLE: + return ((Double) x).compareTo((Double) y); + case FLOAT: + return ((Float) x).compareTo((Float) y); + case INTEGER: + return ((Integer) x).compareTo((Integer) y); + case LONG: + return ((Long) x).compareTo((Long) y); + case SHORT: + return ((Short) x).compareTo((Short) y); + default: + throw new IllegalArgumentException(); + } } enum NumericType { - BIG_DECIMAL(BigDecimal.class), // - BIG_INTEGER(BigInteger.class), // - BYTE(Byte.class), // - DOUBLE(Double.class), // - FLOAT(Float.class), // - INTEGER(Integer.class), // - LONG(Long.class), // - SHORT(Short.class); - - private static Map, NumericType> types; - - private NumericType(Class cls) { - register(cls, this); - } - - private void register(Class cls, NumericType type) { - if (NumericType.types == null) - NumericType.types = Maps.newHashMap(); - types.put(cls, type); - } - - public static NumericType of(Object value) { - return value != null ? types.get(value.getClass()) : null; - } + BIG_DECIMAL(BigDecimal.class), // + BIG_INTEGER(BigInteger.class), // + BYTE(Byte.class), // + DOUBLE(Double.class), // + FLOAT(Float.class), // + INTEGER(Integer.class), // + LONG(Long.class), // + SHORT(Short.class); + + private static Map, NumericType> types; + + private NumericType(Class cls) { + register(cls, this); + } + + private void register(Class cls, NumericType type) { + if (NumericType.types == null) + NumericType.types = Maps.newHashMap(); + types.put(cls, type); + } + + public static NumericType of(Object value) { + return value != null ? types.get(value.getClass()) : null; + } } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidator.java index ab84d795..82fc0ccc 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidator.java @@ -16,6 +16,6 @@ public class ObjectValidator extends OverlayValidator { @Override public void validate(T overlay, ValidationResults results) { - super.validate(overlay, results, ObjectNode.class); + super.validate(overlay, results, ObjectNode.class); } } \ No newline at end of file diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidatorBase.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidatorBase.java index c3f0c878..eec39401 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidatorBase.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ObjectValidatorBase.java @@ -17,44 +17,44 @@ import com.reprezen.jsonoverlay.PropertiesOverlay; public abstract class ObjectValidatorBase extends ValidatorBase { - @Inject(optional = true) - private ImplValidator implValidator; + @Inject(optional = true) + private ImplValidator implValidator; - public abstract void validateObject(T object, ValidationResults results); + public abstract void validateObject(T object, ValidationResults results); - protected static ThreadLocal validationVisits = new ThreadLocal(); + protected static ThreadLocal validationVisits = new ThreadLocal(); - protected static boolean visit(Object obj) { - if (validationVisits.get() == null) { - validationVisits.set(new ValidationVisits()); - } - return validationVisits.get().visit(obj); + protected static boolean visit(Object obj) { + if (validationVisits.get() == null) { + validationVisits.set(new ValidationVisits()); } - - @Override - public void validate(T value, ValidationResults results) { - if (!visit(value)) { - @SuppressWarnings("unchecked") - PropertiesOverlay propValue = (PropertiesOverlay) value; - if (propValue._isElaborated()) { - validateObject(value, results); - if (implValidator != null) { - implValidator.validateImpl(value, results); - } - } + return validationVisits.get().visit(obj); + } + + @Override + public void validate(T value, ValidationResults results) { + if (!visit(value)) { + @SuppressWarnings("unchecked") + PropertiesOverlay propValue = (PropertiesOverlay) value; + if (propValue._isElaborated()) { + validateObject(value, results); + if (implValidator != null) { + implValidator.validateImpl(value, results); } + } } - - protected static class ValidationVisits { - private Map visits = new IdentityHashMap(); - - public boolean visit(Object obj) { - if (visits.containsKey(obj)) { - return false; - } else { - visits.put(obj, obj); - return true; - } - } + } + + protected static class ValidationVisits { + private Map visits = new IdentityHashMap(); + + public boolean visit(Object obj) { + if (visits.containsKey(obj)) { + return false; + } else { + visits.put(obj, obj); + return true; + } } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/OverlayValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/OverlayValidator.java index 322e39a2..45401337 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/OverlayValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/OverlayValidator.java @@ -25,77 +25,77 @@ public class OverlayValidator extends ValidatorBase { - @Override - public void validate(T overlay, ValidationResults results) { - checkReferences((JsonOverlay) overlay, results); - } + @Override + public void validate(T overlay, ValidationResults results) { + checkReferences((JsonOverlay) overlay, results); + } - public void validate(T overlay, ValidationResults results, Class allowedNodeType) { - validate(overlay, results, Collections.>singleton(allowedNodeType)); - } + public void validate(T overlay, ValidationResults results, Class allowedNodeType) { + validate(overlay, results, Collections.>singleton(allowedNodeType)); + } - public void validate(T object, ValidationResults results, Set> allowedNodeTypes) { - JsonOverlay overlay = (JsonOverlay) object; - JsonNode json = Overlay.toJson(overlay); - boolean isValidJsonType = false; - for (Class type : allowedNodeTypes) { - if (type.isAssignableFrom(json.getClass())) { - isValidJsonType = true; - break; - } - } - isValidJsonType = isValidJsonType || json.isMissingNode(); - if (!isValidJsonType) { - results.addError(m.msg("WrongTypeJson|Property bound to incompatible JSON Node type", json.getNodeType(), - allowedNodeTypes)); - } + public void validate(T object, ValidationResults results, Set> allowedNodeTypes) { + JsonOverlay overlay = (JsonOverlay) object; + JsonNode json = Overlay.toJson(overlay); + boolean isValidJsonType = false; + for (Class type : allowedNodeTypes) { + if (type.isAssignableFrom(json.getClass())) { + isValidJsonType = true; + break; + } } - - private void checkReferences(JsonOverlay overlay, ValidationResults results) { - if (overlay instanceof ListOverlay) { - checkReferences((ListOverlay) overlay, results); - } else if (overlay instanceof MapOverlay) { - checkReferences((MapOverlay) overlay, results); - } else if (overlay instanceof PropertiesOverlay) { - checkReferences((PropertiesOverlay) overlay, results); - } + isValidJsonType = isValidJsonType || json.isMissingNode(); + if (!isValidJsonType) { + results.addError(m.msg("WrongTypeJson|Property bound to incompatible JSON Node type", json.getNodeType(), + allowedNodeTypes)); } + } - private void checkReferences(ListOverlay list, ValidationResults results) { - Overlay listAdapter = Overlay.of(list); - for (int i = 0; i < list.size(); i++) { - if (listAdapter.isReference(i)) { - checkReference(listAdapter.getReference(i), results, Integer.toString(i)); - } - } + private void checkReferences(JsonOverlay overlay, ValidationResults results) { + if (overlay instanceof ListOverlay) { + checkReferences((ListOverlay) overlay, results); + } else if (overlay instanceof MapOverlay) { + checkReferences((MapOverlay) overlay, results); + } else if (overlay instanceof PropertiesOverlay) { + checkReferences((PropertiesOverlay) overlay, results); } + } - private void checkReferences(MapOverlay map, ValidationResults results) { - Overlay mapAdapter = Overlay.of(map); - for (String key : map.keySet()) { - if (mapAdapter.isReference(key)) { - checkReference(mapAdapter.getReference(key), results, key); - } - } + private void checkReferences(ListOverlay list, ValidationResults results) { + Overlay listAdapter = Overlay.of(list); + for (int i = 0; i < list.size(); i++) { + if (listAdapter.isReference(i)) { + checkReference(listAdapter.getReference(i), results, Integer.toString(i)); + } } + } - private void checkReferences(PropertiesOverlay props, ValidationResults results) { - if (props._isElaborated()) { - Overlay propsAdapter = Overlay.of(props); - for (String name : propsAdapter.getPropertyNames()) { - if (propsAdapter.isReference(name)) { - checkReference(propsAdapter.getReference(name), results, name); - } - } - } + private void checkReferences(MapOverlay map, ValidationResults results) { + Overlay mapAdapter = Overlay.of(map); + for (String key : map.keySet()) { + if (mapAdapter.isReference(key)) { + checkReference(mapAdapter.getReference(key), results, key); + } } + } - private void checkReference(Reference ref, ValidationResults results, String crumb) { - if (ref.isInvalid()) { - results.addError( - m.msg("BadRef|JSON reference node was not resolved", ref.getRefString(), ref.getInvalidReason()), - crumb); + private void checkReferences(PropertiesOverlay props, ValidationResults results) { + if (props._isElaborated()) { + Overlay propsAdapter = Overlay.of(props); + for (String name : propsAdapter.getPropertyNames()) { + if (propsAdapter.isReference(name)) { + checkReference(propsAdapter.getReference(name), results, name); } + } + } + } + private void checkReference(Reference ref, ValidationResults results, String crumb) { + if (ref.isInvalid()) { + results.addError( + m.msg("BadRef|JSON reference node was not resolved", ref.getRefString(), ref.getInvalidReason()), + crumb); } + + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/StringValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/StringValidator.java index acbbbb78..9de35970 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/StringValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/StringValidator.java @@ -17,7 +17,7 @@ public class StringValidator extends OverlayValidator { @Override public void validate(StringOverlay overlay, ValidationResults results) { - super.validate(overlay, results, TextNode.class); + super.validate(overlay, results, TextNode.class); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidationResults.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidationResults.java index b4a19eec..cd06e2f0 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidationResults.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidationResults.java @@ -28,139 +28,139 @@ public class ValidationResults { public enum Severity { - NONE, INFO, WARNING, ERROR; + NONE, INFO, WARNING, ERROR; - public static final Severity MAX_SEVERITY = ERROR; + public static final Severity MAX_SEVERITY = ERROR; - public boolean lt(Severity other) { - return this.compareTo(other) < 0; - } + public boolean lt(Severity other) { + return this.compareTo(other) < 0; + } - public boolean le(Severity other) { - return this.compareTo(other) <= 0; - } + public boolean le(Severity other) { + return this.compareTo(other) <= 0; + } - public boolean gt(Severity other) { - return this.compareTo(other) > 0; - } + public boolean gt(Severity other) { + return this.compareTo(other) > 0; + } - public boolean ge(Severity other) { - return this.compareTo(other) >= 0; - } + public boolean ge(Severity other) { + return this.compareTo(other) >= 0; + } }; List items = Lists.newArrayList(); List crumbs = Collections.emptyList(); public void addInfo(String msg) { - items.add(new ValidationItem(INFO, msg, crumbs)); + items.add(new ValidationItem(INFO, msg, crumbs)); } public void addInfo(String msg, String crumb) { - items.add(new ValidationItem(INFO, msg, crumbs, crumb)); + items.add(new ValidationItem(INFO, msg, crumbs, crumb)); } public void addWarning(String msg) { - items.add(new ValidationItem(WARNING, msg, crumbs)); + items.add(new ValidationItem(WARNING, msg, crumbs)); } public void addWarning(String msg, String crumb) { - items.add(new ValidationItem(WARNING, msg, crumbs, crumb)); + items.add(new ValidationItem(WARNING, msg, crumbs, crumb)); } public void addError(String msg) { - items.add(new ValidationItem(ERROR, msg, crumbs)); + items.add(new ValidationItem(ERROR, msg, crumbs)); } public void addError(String msg, String crumb) { - items.add(new ValidationItem(ERROR, msg, crumbs, crumb)); + items.add(new ValidationItem(ERROR, msg, crumbs, crumb)); } public void add(ValidationResults results) { - items.addAll(results.getItems()); + items.addAll(results.getItems()); } public Collection getItems() { - return items; + return items; } public Severity getSeverity() { - Severity severity = NONE; - for (ValidationItem item : items) { - if (item.getSeverity().gt(severity)) { - severity = item.getSeverity(); - if (severity == MAX_SEVERITY) { - break; - } - } - } - return severity; + Severity severity = NONE; + for (ValidationItem item : items) { + if (item.getSeverity().gt(severity)) { + severity = item.getSeverity(); + if (severity == MAX_SEVERITY) { + break; + } + } + } + return severity; } public > void validateWithCrumb(String crumb, Validator validator, T object) { - List priorCrumbs = crumbs; - try { - if (crumb != null) { - crumbs = appendCrumb(crumb, priorCrumbs); - } - validator.validate(object, this); - } finally { - crumbs = priorCrumbs; - } + List priorCrumbs = crumbs; + try { + if (crumb != null) { + crumbs = appendCrumb(crumb, priorCrumbs); + } + validator.validate(object, this); + } finally { + crumbs = priorCrumbs; + } } public void withCrumb(String crumb, Runnable code) { - List priorCrumbs = crumbs; - try { - crumbs = appendCrumb(crumb, priorCrumbs); - code.run(); - } finally { - crumbs = priorCrumbs; - } + List priorCrumbs = crumbs; + try { + crumbs = appendCrumb(crumb, priorCrumbs); + code.run(); + } finally { + crumbs = priorCrumbs; + } } private static List appendCrumb(String crumb, List existingCrumbs) { - if (crumb != null) { - List newCrumbs = Lists.newArrayList(existingCrumbs); - newCrumbs.add(crumb); - return newCrumbs; - } else { - return existingCrumbs; - } + if (crumb != null) { + List newCrumbs = Lists.newArrayList(existingCrumbs); + newCrumbs.add(crumb); + return newCrumbs; + } else { + return existingCrumbs; + } } public static class ValidationItem { - private Severity severity; - private String msg; - private List crumbs; - - public ValidationItem(Severity severity, String msg, List crumbs) { - super(); - this.severity = severity; - this.msg = msg; - this.crumbs = crumbs; - } - - public ValidationItem(Severity severity, String msg, List crumbs, String crumb) { - this(severity, msg, appendCrumb(crumb, crumbs)); - } - - public Severity getSeverity() { - return severity; - } - - public String getMsg() { - return msg; - } - - public List getCrumbs() { - return crumbs; - } - - @Override - public String toString() { - String label = crumbs != null & !crumbs.isEmpty() ? StringUtils.join(crumbs, '.') + ": " : ""; - return label + msg; - } + private Severity severity; + private String msg; + private List crumbs; + + public ValidationItem(Severity severity, String msg, List crumbs) { + super(); + this.severity = severity; + this.msg = msg; + this.crumbs = crumbs; + } + + public ValidationItem(Severity severity, String msg, List crumbs, String crumb) { + this(severity, msg, appendCrumb(crumb, crumbs)); + } + + public Severity getSeverity() { + return severity; + } + + public String getMsg() { + return msg; + } + + public List getCrumbs() { + return crumbs; + } + + @Override + public String toString() { + String label = crumbs != null & !crumbs.isEmpty() ? StringUtils.join(crumbs, '.') + ": " : ""; + return label + msg; + } } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidatorBase.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidatorBase.java index 74ac625c..488e7a99 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidatorBase.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/ValidatorBase.java @@ -37,294 +37,298 @@ public abstract class ValidatorBase implements Validator { @Override public ValidationResults validate(T object) { - ValidationResults results = new ValidationResults(); - validate(object, results); - return results; + ValidationResults results = new ValidationResults(); + validate(object, results); + return results; } @Override public void validate(final T object, final ValidationResults results, String crumb) { - results.withCrumb(crumb, new Runnable() { - @Override - public void run() { - validate(object, results); - } - }); + results.withCrumb(crumb, new Runnable() { + @Override + public void run() { + validate(object, results); + } + }); } public void validateString(final String value, final ValidationResults results, final boolean required, - final String crumb) { - validateString(value, results, required, (Pattern) null, crumb); + final String crumb) { + validateString(value, results, required, (Pattern) null, crumb); } public void validateString(final String value, final ValidationResults results, final boolean required, - final String pattern, final String crumb) { - validateString(value, results, required, Pattern.compile(pattern), crumb); + final String pattern, final String crumb) { + validateString(value, results, required, Pattern.compile(pattern), crumb); } public void validateString(final String value, final ValidationResults results, final boolean required, - final Pattern pattern, final String crumb) { - checkMissing(required, value, results, crumb); - if (value != null && pattern != null && !pattern.matcher(value).matches()) { - results.addError(m.msg("PatternMatchFail|String value does not match required pattern", value, pattern), - crumb); - } + final Pattern pattern, final String crumb) { + checkMissing(required, value, results, crumb); + if (value != null && pattern != null && !pattern.matcher(value).matches()) { + results.addError(m.msg("PatternMatchFail|String value does not match required pattern", value, pattern), + crumb); + } } public void validateUrl(String value, ValidationResults results, boolean required, String crumb) { - validateUrl(value, results, required, crumb, false); + validateUrl(value, results, required, crumb, false); } public void validateUrl(String value, ValidationResults results, boolean required, String crumb, - boolean allowVars) { - validateUrl(value, results, required, crumb, allowVars, Severity.ERROR); + boolean allowVars) { + validateUrl(value, results, required, crumb, allowVars, Severity.ERROR); } public void validateUrl(final String value, final ValidationResults results, boolean required, String crumb, - final boolean allowVars, final Severity severity) { - validateString(value, results, required, (Pattern) null, crumb); - if (value != null) { - checkUrl(value, results, allowVars, severity, crumb); - } + final boolean allowVars, final Severity severity) { + validateString(value, results, required, (Pattern) null, crumb); + if (value != null) { + checkUrl(value, results, allowVars, severity, crumb); + } } public void validateEmail(final String value, final ValidationResults results, boolean required, String crumb) { - validateString(value, results, required, (Pattern) null, crumb); - if (value != null) { - checkEmail(value, results, crumb); - } + validateString(value, results, required, (Pattern) null, crumb); + if (value != null) { + checkEmail(value, results, crumb); + } } public void validatePositive(final N value, final ValidationResults results, - final boolean required, final String crumb) { - checkMissing(required, value, results, crumb); - if (value != null && le(value, zero(value))) { - results.addError(m.msg("ReqPositive|Value must be strictly positive", crumb, value), crumb); - } + final boolean required, final String crumb) { + checkMissing(required, value, results, crumb); + if (value != null && le(value, zero(value))) { + results.addError(m.msg("ReqPositive|Value must be strictly positive", crumb, value), crumb); + } } public void validateNonNegative(final N value, final ValidationResults results, - final boolean required, final String crumb) { - checkMissing(required, value, results, crumb); - if (value != null && lt(value, zero(value))) { - results.addError(m.msg("ReqPositive|Value must be strictly positive", crumb, value), crumb); - } + final boolean required, final String crumb) { + checkMissing(required, value, results, crumb); + if (value != null && lt(value, zero(value))) { + results.addError(m.msg("ReqPositive|Value must be strictly positive", crumb, value), crumb); + } } public void validateNonEmpty(Collection values, boolean hasValues, ValidationResults results, String crumb) { - if (hasValues && values.isEmpty()) { - results.addError(m.msg("EmptyColl|Collection may not be empty"), crumb); - } + if (hasValues && values.isEmpty()) { + results.addError(m.msg("EmptyColl|Collection may not be empty"), crumb); + } } public void validateUnique(final Collection values, final ValidationResults results, final String crumb) { - results.withCrumb(crumb, new Runnable() { - Set seen = Sets.newHashSet(); - - @Override - public void run() { - int i = 0; - for (V value : values) { - if (seen.contains(value)) { - results.addError(m.msg("DuplicateValue|Value appeared already", value, crumb), "[" + i + "]"); - } else { - seen.add(value); - } - i += 1; - } - } - }); + results.withCrumb(crumb, new Runnable() { + Set seen = Sets.newHashSet(); + + @Override + public void run() { + int i = 0; + for (V value : values) { + if (seen.contains(value)) { + results.addError(m.msg("DuplicateValue|Value appeared already", value, crumb), "[" + i + "]"); + } else { + seen.add(value); + } + i += 1; + } + } + }); } public void validatePattern(final String pattern, final ValidationResults results, final boolean required, - final String crumb) { - checkMissing(required, pattern, results, crumb); - if (pattern != null) { - try { - Pattern.compile(pattern); - } catch (PatternSyntaxException e) { - results.addWarning( - m.msg("BadPattern|Pattern is not a valid Java Regular Expression but may be valid ECMA 262", - pattern), - crumb); - } - } + final String crumb) { + checkMissing(required, pattern, results, crumb); + if (pattern != null) { + try { + Pattern.compile(pattern); + } catch (PatternSyntaxException e) { + results.addWarning( + m.msg("BadPattern|Pattern is not a valid Java Regular Expression but may be valid ECMA 262", + pattern), + crumb); + } + } } public void validateField(final F value, final ValidationResults results, final boolean required, - final String crumb, final Validator validator) { - checkMissing(required, value, results, crumb); - if (isPresent(value)) { - validator.validate(value, results, crumb); - } + final String crumb, final Validator validator) { + checkMissing(required, value, results, crumb); + if (isPresent(value)) { + validator.validate(value, results, crumb); + } } public void validateList(final Collection value, final boolean isPresent, - final ValidationResults results, final boolean required, final String crumb, final Validator validator) { - if (required && !isPresent) { - results.addError(m.msg("MissingField|Required field is missing", crumb), crumb); - } - if (isPresent && validator != null) { - int i = 0; - for (V element : value) { - validator.validate(element, results, "[" + i++ + "]"); - } - } + final ValidationResults results, final boolean required, final String crumb, final Validator validator) { + if (required && !isPresent) { + results.addError(m.msg("MissingField|Required field is missing", crumb), crumb); + } + if (isPresent && validator != null) { + int i = 0; + for (V element : value) { + validator.validate(element, results, "[" + i++ + "]"); + } + } } public void validateMap(final Map value, final ValidationResults results, - final boolean required, final String crumb, final Pattern pattern, final Validator validator) { - checkMissing(required, value, results, crumb); - results.withCrumb(crumb, new Runnable() { - - @Override - public void run() { - for (Entry entry : value.entrySet()) { - checkKey(entry.getKey(), pattern, results); - if (validator != null) { - validator.validate(entry.getValue(), results, entry.getKey()); - } - } - } - }); + final boolean required, final String crumb, final Pattern pattern, final Validator validator) { + checkMissing(required, value, results, crumb); + results.withCrumb(crumb, new Runnable() { + + @Override + public void run() { + for (Entry entry : value.entrySet()) { + checkKey(entry.getKey(), pattern, results); + if (validator != null) { + validator.validate(entry.getValue(), results, entry.getKey()); + } + } + } + }); } public void validateExtensions(final Map extensions, final ValidationResults results) { - validateExtensions(extensions, results, null); + validateExtensions(extensions, results, null); } public void validateExtensions(final Map extensions, final ValidationResults results, - String crumb) { - validateMap(extensions, results, false, crumb, null, null); + String crumb) { + validateMap(extensions, results, false, crumb, null, null); } public void validateFormat(String format, String type, ValidationResults results, String crumb) { - if (format != null && type != null) { - String normalType = null; - switch (format) { - case "int32": - case "int64": - normalType = "integer"; - break; - case "float": - case "double": - normalType = "number"; - break; - case "byte": - case "binary": - case "date": - case "date-time": - case "password": - normalType = "string"; - break; - } - if (normalType != null && !type.equals(normalType)) { - results.addWarning(m.msg("WrongTypeFormat|OpenAPI-defined format used with nonstandard type", format, - type, normalType), crumb); - } - } + if (format != null && type != null) { + String normalType = null; + switch (format) { + case "int32": + case "int64": + normalType = "integer"; + break; + case "float": + case "double": + normalType = "number"; + break; + case "byte": + case "binary": + case "date": + case "date-time": + case "password": + normalType = "string"; + break; + } + if (normalType != null && !type.equals(normalType)) { + results.addWarning(m.msg("WrongTypeFormat|OpenAPI-defined format used with nonstandard type", format, + type, normalType), crumb); + } + } } public void validateDefault(Object defaultValue, String type, ValidationResults results, String crumb) { - if (defaultValue != null && type != null) { - boolean ok = false; - switch (type) { - case "string": - ok = defaultValue instanceof String; - break; - case "number": - ok = NumericUtils.isNumeric(defaultValue); - break; - case "integer": - ok = NumericUtils.isIntegral(defaultValue); - break; - case "boolean": - ok = defaultValue instanceof Boolean; - break; - case "object": - ok = defaultValue instanceof Map; - break; - case "array": - ok = defaultValue instanceof Collection; - break; - } - if (!ok) { - results.addError(m.msg("WrongTypeValue|Value is incompatible with schema type", type, defaultValue), - crumb); - } - } + if (defaultValue != null && type != null) { + boolean ok = false; + switch (type) { + case "string": + ok = defaultValue instanceof String; + break; + case "number": + ok = NumericUtils.isNumeric(defaultValue); + break; + case "integer": + ok = NumericUtils.isIntegral(defaultValue); + break; + case "boolean": + ok = defaultValue instanceof Boolean; + break; + case "object": + ok = defaultValue instanceof Map; + break; + case "array": + ok = defaultValue instanceof Collection; + break; + } + if (!ok) { + results.addError(m.msg("WrongTypeValue|Value is incompatible with schema type", type, defaultValue), + crumb); + } + } } private void checkMissing(boolean required, final Object value, final ValidationResults results, - final String crumb) { - if (required && !isPresent(value)) { - results.addError(m.msg("MissingField|Required field is missing", crumb), crumb); - } + final String crumb) { + if (required && !isPresent(value)) { + results.addError(m.msg("MissingField|Required field is missing", crumb), crumb); + } } private void checkKey(final String key, final Pattern pattern, final ValidationResults results) { - if (pattern != null && !pattern.matcher(key).matches()) { - results.addError(m.msg("BadKey|Invalid key in map", key, pattern), key); - } + if (pattern != null && !pattern.matcher(key).matches()) { + results.addError(m.msg("BadKey|Invalid key in map", key, pattern), key); + } } public static final String SPECIAL_SCHEME = Handler.class.getPackage().getName() - .substring(ValidatorBase.class.getPackage().getName().length() + 1); + .substring(ValidatorBase.class.getPackage().getName().length() + 1); private static boolean specialSchemeInited = false; private void checkUrl(String url, ValidationResults results, boolean allowVars, Severity severity, String crumb) { - // TODO Q: Any help from spec in being able to validate URLs with vars? E.g is our treatment here valid? We - // assume vars can only appear where simple text can appear, so handling vars means relacing {.*} with "1" and - // testing for URL validity. We use a digit instead of a letter because it covers vars in the port, and - // elsewhere digits are always allowed where letters are. - String origUrl = url; - if (allowVars) { - url = url.replaceAll("\\{[^}]+\\}", "1"); - if (url.startsWith("1:")) { - // "1" is not a valid scheme name, so we need to replace it with special scheme, for which we provide a - // do-nothing protocol handler implementation - url = SPECIAL_SCHEME + url.substring(1); - if (!specialSchemeInited) { - // register protocol handler for special scheme - initSpecialScheme(); - } - } - } - try { - new URL(url); - } catch (MalformedURLException e) { - results.addError(m.msg("BadUrl|Invalid URL", origUrl, e.toString()), crumb); - } + // TODO Q: Any help from spec in being able to validate URLs with vars? + // E.g is our treatment here valid? We + // assume vars can only appear where simple text can appear, so handling + // vars means relacing {.*} with "1" and + // testing for URL validity. We use a digit instead of a letter because + // it covers vars in the port, and + // elsewhere digits are always allowed where letters are. + String origUrl = url; + if (allowVars) { + url = url.replaceAll("\\{[^}]+\\}", "1"); + if (url.startsWith("1:")) { + // "1" is not a valid scheme name, so we need to replace it with + // special scheme, for which we provide a + // do-nothing protocol handler implementation + url = SPECIAL_SCHEME + url.substring(1); + if (!specialSchemeInited) { + // register protocol handler for special scheme + initSpecialScheme(); + } + } + } + try { + new URL(url); + } catch (MalformedURLException e) { + results.addError(m.msg("BadUrl|Invalid URL", origUrl, e.toString()), crumb); + } } private void initSpecialScheme() { - String prop = "java.protocol.handler.pkgs"; - String former = System.getProperty(prop); - try { - System.setProperty(prop, ValidatorBase.class.getPackage().getName()); - new URL(SPECIAL_SCHEME + ":"); - } catch (MalformedURLException e) { - } finally { - if (former != null) { - System.setProperty(prop, former); - } else { - System.getProperties().remove(prop); - } - } - specialSchemeInited = true; + String prop = "java.protocol.handler.pkgs"; + String former = System.getProperty(prop); + try { + System.setProperty(prop, ValidatorBase.class.getPackage().getName()); + new URL(SPECIAL_SCHEME + ":"); + } catch (MalformedURLException e) { + } finally { + if (former != null) { + System.setProperty(prop, former); + } else { + System.getProperties().remove(prop); + } + } + specialSchemeInited = true; } private void checkEmail(String email, ValidationResults results, String crumb) { - try { - InternetAddress addr = new InternetAddress(); - addr.setAddress(email); - addr.validate(); - } catch (AddressException e) { - results.addError(m.msg("BadEmail|Invalid email address", email, e.toString()), crumb); - } + try { + InternetAddress addr = new InternetAddress(); + addr.setAddress(email); + addr.validate(); + } catch (AddressException e) { + results.addError(m.msg("BadEmail|Invalid email address", email, e.toString()), crumb); + } } private boolean isPresent(Object value) { - return value instanceof JsonOverlay ? Overlay.isPresent((JsonOverlay) value) : value != null; - } + return value instanceof JsonOverlay ? Overlay.isPresent((JsonOverlay) value) : value != null; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/oasparser/fake/scheme/Handler.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/oasparser/fake/scheme/Handler.java index 7ae271ea..ddff8397 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/oasparser/fake/scheme/Handler.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val/oasparser/fake/scheme/Handler.java @@ -18,6 +18,6 @@ public class Handler extends URLStreamHandler { @Override protected URLConnection openConnection(URL u) throws IOException { - return null; + return null; } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/CallbackValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/CallbackValidator.java index 557536e3..b7de92e0 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/CallbackValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/CallbackValidator.java @@ -19,13 +19,13 @@ public class CallbackValidator extends ObjectValidatorBase { - @Inject - private Validator pathValidator; + @Inject + private Validator pathValidator; - @Override - public void validateObject(Callback callback, ValidationResults results) { - validateMap(callback.getCallbackPaths(), results, false, null, Regexes.NOEXT_REGEX, pathValidator); - validateExtensions(callback.getExtensions(), results); - } + @Override + public void validateObject(Callback callback, ValidationResults results) { + validateMap(callback.getCallbackPaths(), results, false, null, Regexes.NOEXT_REGEX, pathValidator); + validateExtensions(callback.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ContactValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ContactValidator.java index 3d65b5a0..b6a3ab68 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ContactValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ContactValidator.java @@ -16,11 +16,11 @@ public class ContactValidator extends ObjectValidatorBase { - @Override - public void validateObject(Contact contact, ValidationResults results) { - validateUrl(contact.getUrl(), results, false, "url"); - validateEmail(contact.getEmail(), results, false, "email"); - validateExtensions(contact.getExtensions(), results); - } + @Override + public void validateObject(Contact contact, ValidationResults results) { + validateUrl(contact.getUrl(), results, false, "url"); + validateEmail(contact.getEmail(), results, false, "email"); + validateExtensions(contact.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/EncodingPropertyValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/EncodingPropertyValidator.java index 50f7e86f..b94c2470 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/EncodingPropertyValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/EncodingPropertyValidator.java @@ -16,14 +16,15 @@ public class EncodingPropertyValidator extends ObjectValidatorBase { - @Override - public void validateObject(EncodingProperty encodingProperty, ValidationResults results) { - // no validation for: contentType, explode - // TODO Q: spec says "Headers" (capitalized) for peroperty name -assuming it's a - // typo - validateMap(encodingProperty.getHeaders(), results, false, "headers", Regexes.NOEXT_REGEX, null); - validateString(encodingProperty.getStyle(), results, false, Regexes.STYLE_REGEX, "style"); - validateExtensions(encodingProperty.getExtensions(), results); - } + @Override + public void validateObject(EncodingProperty encodingProperty, ValidationResults results) { + // no validation for: contentType, explode + // TODO Q: spec says "Headers" (capitalized) for peroperty name + // -assuming it's a + // typo + validateMap(encodingProperty.getHeaders(), results, false, "headers", Regexes.NOEXT_REGEX, null); + validateString(encodingProperty.getStyle(), results, false, Regexes.STYLE_REGEX, "style"); + validateExtensions(encodingProperty.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExampleValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExampleValidator.java index 3998a858..64df6c16 100644 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExampleValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExampleValidator.java @@ -16,9 +16,9 @@ public class ExampleValidator extends ObjectValidatorBase { - @Override - public void validateObject(Example object, ValidationResults results) { - // TODO Auto-generated method stub - } + @Override + public void validateObject(Example object, ValidationResults results) { + // TODO Auto-generated method stub + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExternalDocsValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExternalDocsValidator.java index 296a2a24..eb7063c5 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExternalDocsValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ExternalDocsValidator.java @@ -16,11 +16,11 @@ public class ExternalDocsValidator extends ObjectValidatorBase { - @Override - public void validateObject(ExternalDocs externalDocs, ValidationResults results) { - // no validation for: description - validateUrl(externalDocs.getUrl(), results, true, "externalDocs"); - validateExtensions(externalDocs.getExtensions(), results); - } + @Override + public void validateObject(ExternalDocs externalDocs, ValidationResults results) { + // no validation for: description + validateUrl(externalDocs.getUrl(), results, true, "externalDocs"); + validateExtensions(externalDocs.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/HeaderValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/HeaderValidator.java index 44f36155..1af7aef5 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/HeaderValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/HeaderValidator.java @@ -25,64 +25,65 @@ public class HeaderValidator extends ObjectValidatorBase
{ - @Inject - private Validator schemaValidator; - @Inject - private Validator mediaTypeValidator; + @Inject + private Validator schemaValidator; + @Inject + private Validator mediaTypeValidator; - @Override - public void validateObject(Header header, ValidationResults results) { - // no validations for: description, deprecated, allowEmptyValue, explode, - // example, examples - validateString(header.getName(), results, false, "name"); - validateString(header.getIn(), results, false, Regexes.PARAM_IN_REGEX, "in"); - checkPathParam(header, results); - checkRequired(header, results); - validateString(header.getStyle(), results, false, Regexes.STYLE_REGEX, "style"); - checkAllowReserved(header, results); - // TODO Q: Should schema be required in header object? - validateField(header.getSchema(false), results, false, "schema", schemaValidator); - validateMap(header.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, mediaTypeValidator); - validateExtensions(header.getExtensions(), results); - } + @Override + public void validateObject(Header header, ValidationResults results) { + // no validations for: description, deprecated, allowEmptyValue, + // explode, + // example, examples + validateString(header.getName(), results, false, "name"); + validateString(header.getIn(), results, false, Regexes.PARAM_IN_REGEX, "in"); + checkPathParam(header, results); + checkRequired(header, results); + validateString(header.getStyle(), results, false, Regexes.STYLE_REGEX, "style"); + checkAllowReserved(header, results); + // TODO Q: Should schema be required in header object? + validateField(header.getSchema(false), results, false, "schema", schemaValidator); + validateMap(header.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, mediaTypeValidator); + validateExtensions(header.getExtensions(), results); + } - private void checkPathParam(Header header, ValidationResults results) { - if (header.getIn() != null && header.getIn().equals("path") && header.getName() != null) { - String path = getPathString(header); - if (path != null) { - if (!path.matches(".*/\\{" + header.getName() + "\\}(/.*)?")) { - results.addError(m.msg("MissingPathTplt|No template for path parameter in path string", - header.getName(), path), "name"); - } - } else { - results.addWarning( - m.msg("NoPath|Could not locate path for parameter", header.getName(), header.getIn())); - } + private void checkPathParam(Header header, ValidationResults results) { + if (header.getIn() != null && header.getIn().equals("path") && header.getName() != null) { + String path = getPathString(header); + if (path != null) { + if (!path.matches(".*/\\{" + header.getName() + "\\}(/.*)?")) { + results.addError(m.msg("MissingPathTplt|No template for path parameter in path string", + header.getName(), path), "name"); } + } else { + results.addWarning( + m.msg("NoPath|Could not locate path for parameter", header.getName(), header.getIn())); + } } + } - private void checkRequired(Header header, ValidationResults results) { - if ("path".equals(header.getIn())) { - if (header.getRequired() != Boolean.TRUE) { - results.addError( - m.msg("PathParamReq|Path param must have 'required' property set true", header.getName()), - "required"); - } - } + private void checkRequired(Header header, ValidationResults results) { + if ("path".equals(header.getIn())) { + if (header.getRequired() != Boolean.TRUE) { + results.addError( + m.msg("PathParamReq|Path param must have 'required' property set true", header.getName()), + "required"); + } } + } - private void checkAllowReserved(Header header, ValidationResults results) { - if (header.isAllowReserved() && !"query".equals(header.getIn())) { - results.addWarning(m.msg("NonQryAllowRsvd|AllowReserved is ignored for non-query parameter", - header.getName(), header.getIn()), "allowReserved"); - } + private void checkAllowReserved(Header header, ValidationResults results) { + if (header.isAllowReserved() && !"query".equals(header.getIn())) { + results.addWarning(m.msg("NonQryAllowRsvd|AllowReserved is ignored for non-query parameter", + header.getName(), header.getIn()), "allowReserved"); } + } - private String getPathString(Header header) { - PropertiesOverlay parent = Overlay.of(header).getParentPropertiesOverlay(); - while (parent != null && !(parent instanceof Path)) { - parent = Overlay.of(parent).getParentPropertiesOverlay(); - } - return parent != null && parent instanceof Path ? Overlay.getPathInParent(parent) : null; + private String getPathString(Header header) { + PropertiesOverlay parent = Overlay.of(header).getParentPropertiesOverlay(); + while (parent != null && !(parent instanceof Path)) { + parent = Overlay.of(parent).getParentPropertiesOverlay(); } + return parent != null && parent instanceof Path ? Overlay.getPathInParent(parent) : null; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/InfoValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/InfoValidator.java index dec1ba29..95d8bde5 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/InfoValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/InfoValidator.java @@ -20,17 +20,17 @@ public class InfoValidator extends ObjectValidatorBase { - @Inject - private Validator contactValidator; - @Inject - private Validator licenseValidator; + @Inject + private Validator contactValidator; + @Inject + private Validator licenseValidator; - @Override - public void validateObject(Info info, ValidationResults results) { - validateString(info.getTitle(), results, true, "title"); - validateField(info.getContact(false), results, false, "contact", contactValidator); - validateField(info.getLicense(false), results, false, "license", licenseValidator); - validateString(info.getVersion(), results, true, "version"); - validateExtensions(info.getExtensions(), results); - } + @Override + public void validateObject(Info info, ValidationResults results) { + validateString(info.getTitle(), results, true, "title"); + validateField(info.getContact(false), results, false, "contact", contactValidator); + validateField(info.getLicense(false), results, false, "license", licenseValidator); + validateString(info.getVersion(), results, true, "version"); + validateExtensions(info.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LicenseValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LicenseValidator.java index a8c52b6b..7dd9596b 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LicenseValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LicenseValidator.java @@ -16,11 +16,11 @@ public class LicenseValidator extends ObjectValidatorBase { - @Override - public void validateObject(License license, ValidationResults results) { - validateString(license.getName(), results, true, "name"); - validateUrl(license.getUrl(), results, false, "url"); - validateExtensions(license.getExtensions(), results); - } + @Override + public void validateObject(License license, ValidationResults results) { + validateString(license.getName(), results, true, "name"); + validateUrl(license.getUrl(), results, false, "url"); + validateExtensions(license.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LinkValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LinkValidator.java index e3d12c1a..e34d701c 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LinkValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/LinkValidator.java @@ -30,108 +30,109 @@ public class LinkValidator extends ObjectValidatorBase { - @Inject - private Validator
headerValidator; + @Inject + private Validator
headerValidator; - @Override - public void validateObject(Link link, ValidationResults results) { - // no validation for: description - // TODO: Validate operationRef value (why didn't they must make it a ref - // object???!) - Operation op = checkValidOperation(link, results); - if (op != null) { - checkParameters(link, op, results); - } - validateMap(link.getHeaders(), results, false, "headers", Regexes.NOEXT_REGEX, headerValidator); - validateExtensions(link.getExtensions(), results); + @Override + public void validateObject(Link link, ValidationResults results) { + // no validation for: description + // TODO: Validate operationRef value (why didn't they must make it a ref + // object???!) + Operation op = checkValidOperation(link, results); + if (op != null) { + checkParameters(link, op, results); } + validateMap(link.getHeaders(), results, false, "headers", Regexes.NOEXT_REGEX, headerValidator); + validateExtensions(link.getExtensions(), results); + } - private Operation checkValidOperation(Link link, ValidationResults results) { - String opId = link.getOperationId(); - String operationRef = link.getOperationRef(); - Operation op = null; - if (opId == null && operationRef == null) { - results.addError( - m.msg("NoOpIdNoOpRefInLink|Link must contain eitehr 'operationRef' or 'operationId' properties")); - } else if (opId != null && operationRef != null) { - results.addError( - m.msg("OpIdAndOpRefInLink|Link may not contain both 'operationRef' and 'operationId' properties")); - } - if (opId != null) { - op = findOperationById(Overlay.of(link).getModel(), opId); - if (op == null) { - results.addError( - m.msg("OpIdNotFound|OperationId in Link does not identify an operation in the containing model", - opId), - "operationId"); - } - } - String relativePath = getRelativePath(operationRef, results); - if (relativePath != null) { - op = findOperationByPath(Overlay.of(link).getModel(), relativePath, results); - if (op == null) { - results.addError(m.msg( - "OpPathNotFound|Relative OperationRef in Link does not identify a GET operation in the containing model", - operationRef), "operationRef"); - } - // - } - return op; + private Operation checkValidOperation(Link link, ValidationResults results) { + String opId = link.getOperationId(); + String operationRef = link.getOperationRef(); + Operation op = null; + if (opId == null && operationRef == null) { + results.addError( + m.msg("NoOpIdNoOpRefInLink|Link must contain eitehr 'operationRef' or 'operationId' properties")); + } else if (opId != null && operationRef != null) { + results.addError( + m.msg("OpIdAndOpRefInLink|Link may not contain both 'operationRef' and 'operationId' properties")); + } + if (opId != null) { + op = findOperationById(Overlay.of(link).getModel(), opId); + if (op == null) { + results.addError( + m.msg("OpIdNotFound|OperationId in Link does not identify an operation in the containing model", + opId), + "operationId"); + } } + String relativePath = getRelativePath(operationRef, results); + if (relativePath != null) { + op = findOperationByPath(Overlay.of(link).getModel(), relativePath, results); + if (op == null) { + results.addError(m.msg( + "OpPathNotFound|Relative OperationRef in Link does not identify a GET operation in the containing model", + operationRef), "operationRef"); + } + // + } + return op; + } - private void checkParameters(Link link, Operation op, ValidationResults results) { - // TODO Q: parameter name is not sufficient to identify param in operation; will - // allow if it's unique, warn if - // it's not - Map opParamCounts = getParamNameCounts(op.getParameters()); - for (String paramName : link.getParameters().keySet()) { - int count = opParamCounts.get(paramName); - if (count == 0) { - results.addError(m.msg("BadLinkParam|Link parameter does not appear in linked operation", paramName), - paramName); - } else if (count > 1) { - results.addWarning( - m.msg("AmbigLinkParam|Link parameter name appears more than once in linked operation", - paramName), - paramName); - } - } + private void checkParameters(Link link, Operation op, ValidationResults results) { + // TODO Q: parameter name is not sufficient to identify param in + // operation; will + // allow if it's unique, warn if + // it's not + Map opParamCounts = getParamNameCounts(op.getParameters()); + for (String paramName : link.getParameters().keySet()) { + int count = opParamCounts.get(paramName); + if (count == 0) { + results.addError(m.msg("BadLinkParam|Link parameter does not appear in linked operation", paramName), + paramName); + } else if (count > 1) { + results.addWarning( + m.msg("AmbigLinkParam|Link parameter name appears more than once in linked operation", + paramName), + paramName); + } } + } - private Operation findOperationById(OpenApi3 model, String operationId) { - for (Path path : model.getPaths().values()) { - for (Operation op : path.getOperations().values()) { - if (operationId.equals(op.getOperationId())) { - return op; - } - } + private Operation findOperationById(OpenApi3 model, String operationId) { + for (Path path : model.getPaths().values()) { + for (Operation op : path.getOperations().values()) { + if (operationId.equals(op.getOperationId())) { + return op; } - return null; + } } + return null; + } - private Operation findOperationByPath(OpenApi3 model, String relativePath, ValidationResults results) { - Path path = model.getPath(relativePath); - return path != null ? path.getGet(false) : null; - } + private Operation findOperationByPath(OpenApi3 model, String relativePath, ValidationResults results) { + Path path = model.getPath(relativePath); + return path != null ? path.getGet(false) : null; + } - private String getRelativePath(String operationRef, ValidationResults results) { - // TODO Q: will braces be pct-encoded as required for URIs? - if (operationRef != null) { - results.addWarning("OperationRefUnSupp|Link.operationRef is not yet supported", "operationRef"); - } - return null; + private String getRelativePath(String operationRef, ValidationResults results) { + // TODO Q: will braces be pct-encoded as required for URIs? + if (operationRef != null) { + results.addWarning("OperationRefUnSupp|Link.operationRef is not yet supported", "operationRef"); } + return null; + } - private Map getParamNameCounts(Collection parameters) { - Map counts = Maps.newHashMap(); - for (Parameter parameter : parameters) { - String name = parameter.getName(); - if (counts.containsKey(name)) { - counts.put(name, 1 + counts.get(name)); - } else { - counts.put(name, 1); - } - } - return counts; + private Map getParamNameCounts(Collection parameters) { + Map counts = Maps.newHashMap(); + for (Parameter parameter : parameters) { + String name = parameter.getName(); + if (counts.containsKey(name)) { + counts.put(name, 1 + counts.get(name)); + } else { + counts.put(name, 1); + } } + return counts; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/MediaTypeValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/MediaTypeValidator.java index 58fb7874..8024175a 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/MediaTypeValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/MediaTypeValidator.java @@ -26,38 +26,38 @@ public class MediaTypeValidator extends ObjectValidatorBase { - @Inject - private Validator schemaValidator; - @Inject - private Validator encodingPropertyValidator; - @Inject - private Validator exampleValidator; + @Inject + private Validator schemaValidator; + @Inject + private Validator encodingPropertyValidator; + @Inject + private Validator exampleValidator; - @Override - public void validateObject(MediaType mediaType, ValidationResults results) { - // no validation for: example, examples - // TODO Q: Should schema be required in media type? - validateField(mediaType.getSchema(false), results, false, "schema", schemaValidator); - validateMap(mediaType.getEncodingProperties(), results, false, "encoding", Regexes.NOEXT_NAME_REGEX, - encodingPropertyValidator); - checkEncodingPropsAreProps(mediaType, results); - validateExtensions(mediaType.getExtensions(), results); - validateMap(mediaType.getExamples(), results, false, "examples", Regexes.NOEXT_NAME_REGEX, exampleValidator); - } + @Override + public void validateObject(MediaType mediaType, ValidationResults results) { + // no validation for: example, examples + // TODO Q: Should schema be required in media type? + validateField(mediaType.getSchema(false), results, false, "schema", schemaValidator); + validateMap(mediaType.getEncodingProperties(), results, false, "encoding", Regexes.NOEXT_NAME_REGEX, + encodingPropertyValidator); + checkEncodingPropsAreProps(mediaType, results); + validateExtensions(mediaType.getExtensions(), results); + validateMap(mediaType.getExamples(), results, false, "examples", Regexes.NOEXT_NAME_REGEX, exampleValidator); + } - void checkEncodingPropsAreProps(MediaType mediaType, ValidationResults results) { - // TODO Q: do allOf, anyOf, oneOf schemas participate? what about - // additionalProperties? - Schema schema = mediaType.getSchema(false); - if (Overlay.of(schema).isElaborated()) { - Set propNames = schema.getProperties().keySet(); - for (String encodingPropertyName : mediaType.getEncodingProperties().keySet()) { - if (!propNames.contains(encodingPropertyName)) { - results.addError(m.msg( - "EncPropNotSchemaProp|Encoding property does not name a schema property for the media type", - encodingPropertyName), encodingPropertyName); - } - } + void checkEncodingPropsAreProps(MediaType mediaType, ValidationResults results) { + // TODO Q: do allOf, anyOf, oneOf schemas participate? what about + // additionalProperties? + Schema schema = mediaType.getSchema(false); + if (Overlay.of(schema).isElaborated()) { + Set propNames = schema.getProperties().keySet(); + for (String encodingPropertyName : mediaType.getEncodingProperties().keySet()) { + if (!propNames.contains(encodingPropertyName)) { + results.addError(m.msg( + "EncPropNotSchemaProp|Encoding property does not name a schema property for the media type", + encodingPropertyName), encodingPropertyName); } + } } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OAuthFlowValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OAuthFlowValidator.java index a77fcd88..9de11ff6 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OAuthFlowValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OAuthFlowValidator.java @@ -16,13 +16,13 @@ public class OAuthFlowValidator extends ObjectValidatorBase { - @Override - public void validateObject(OAuthFlow oauthFlow, ValidationResults results) { - validateUrl(oauthFlow.getAuthorizationUrl(), results, true, "authorizationUrl"); - validateUrl(oauthFlow.getTokenUrl(), results, true, "tokenUrl"); - validateUrl(oauthFlow.getRefreshUrl(), results, true, "refreshUrl"); - validateMap(oauthFlow.getScopes(), results, true, "scopes", Regexes.NOEXT_REGEX, null); - validateExtensions(oauthFlow.getExtensions(), results); - } + @Override + public void validateObject(OAuthFlow oauthFlow, ValidationResults results) { + validateUrl(oauthFlow.getAuthorizationUrl(), results, true, "authorizationUrl"); + validateUrl(oauthFlow.getTokenUrl(), results, true, "tokenUrl"); + validateUrl(oauthFlow.getRefreshUrl(), results, true, "refreshUrl"); + validateMap(oauthFlow.getScopes(), results, true, "scopes", Regexes.NOEXT_REGEX, null); + validateExtensions(oauthFlow.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OpenApi3Validator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OpenApi3Validator.java index f4f93909..2c3ac583 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OpenApi3Validator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OpenApi3Validator.java @@ -36,66 +36,66 @@ public class OpenApi3Validator extends ObjectValidatorBase { - @Inject - private Validator infoValidator; - @Inject - private Validator serverValidator; - @Inject - private Validator pathValidator; - @Inject - private Validator schemaValidator; - @Inject - private Validator responseValidator; - @Inject - private Validator parameterValidator; - @Inject - private Validator requestBodyValidator; - @Inject - private Validator
headerValidator; - @Inject - private Validator securitySchemeValidator; - @Inject - private Validator linkValidator; - @Inject - private Validator callbackValidator; - @Inject - private Validator securityRequirementValidator; - @Inject - private Validator tagValidator; - @Inject - private Validator externalDocsValidator; + @Inject + private Validator infoValidator; + @Inject + private Validator serverValidator; + @Inject + private Validator pathValidator; + @Inject + private Validator schemaValidator; + @Inject + private Validator responseValidator; + @Inject + private Validator parameterValidator; + @Inject + private Validator requestBodyValidator; + @Inject + private Validator
headerValidator; + @Inject + private Validator securitySchemeValidator; + @Inject + private Validator linkValidator; + @Inject + private Validator callbackValidator; + @Inject + private Validator securityRequirementValidator; + @Inject + private Validator tagValidator; + @Inject + private Validator externalDocsValidator; - @Override - public void validateObject(final OpenApi3 swagger, final ValidationResults results) { - results.withCrumb("model", new Runnable() { - @Override - public void run() { - validateString(swagger.getOpenApi(), results, true, "3\\.\\d+(\\.\\d+.*)?", "openapi"); - validateField(swagger.getInfo(false), results, true, "info", infoValidator); - validateList(swagger.getServers(), swagger.hasServers(), results, false, "servers", serverValidator); - validateMap(swagger.getPaths(), results, true, "paths", PATH_REGEX, pathValidator); - validateMap(swagger.getPathsExtensions(), results, false, "paths", EXT_REGEX, null); - validateMap(swagger.getSchemas(), results, false, "collections/schemas", NAME_REGEX, schemaValidator); - validateMap(swagger.getResponses(), results, false, "collections/responses", NAME_REGEX, - responseValidator); - validateMap(swagger.getParameters(), results, false, "collections/parameters", NAME_REGEX, - parameterValidator); - validateMap(swagger.getExamples(), results, false, "collections/examples", NAME_REGEX, null); - validateMap(swagger.getRequestBodies(), results, false, "collection/requestBodies", NAME_REGEX, - requestBodyValidator); - validateMap(swagger.getHeaders(), results, false, "collections/headers", NAME_REGEX, headerValidator); - validateMap(swagger.getSecuritySchemes(), results, false, "collections/securitySchemes", NAME_REGEX, - securitySchemeValidator); - validateMap(swagger.getLinks(), results, false, "collections/links", NAME_REGEX, linkValidator); - validateMap(swagger.getCallbacks(), results, false, "collections/callbacks", NAME_REGEX, - callbackValidator); - validateMap(swagger.getComponentsExtensions(), results, false, "collections", EXT_REGEX, null); - validateList(swagger.getSecurityRequirements(), swagger.hasSecurityRequirements(), results, false, - "security", securityRequirementValidator); - validateList(swagger.getTags(), swagger.hasTags(), results, false, "tags", tagValidator); - validateField(swagger.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); - validateExtensions(swagger.getExtensions(), results); - } - }); - } + @Override + public void validateObject(final OpenApi3 swagger, final ValidationResults results) { + results.withCrumb("model", new Runnable() { + @Override + public void run() { + validateString(swagger.getOpenApi(), results, true, "3\\.\\d+(\\.\\d+.*)?", "openapi"); + validateField(swagger.getInfo(false), results, true, "info", infoValidator); + validateList(swagger.getServers(), swagger.hasServers(), results, false, "servers", serverValidator); + validateMap(swagger.getPaths(), results, true, "paths", PATH_REGEX, pathValidator); + validateMap(swagger.getPathsExtensions(), results, false, "paths", EXT_REGEX, null); + validateMap(swagger.getSchemas(), results, false, "collections/schemas", NAME_REGEX, schemaValidator); + validateMap(swagger.getResponses(), results, false, "collections/responses", NAME_REGEX, + responseValidator); + validateMap(swagger.getParameters(), results, false, "collections/parameters", NAME_REGEX, + parameterValidator); + validateMap(swagger.getExamples(), results, false, "collections/examples", NAME_REGEX, null); + validateMap(swagger.getRequestBodies(), results, false, "collection/requestBodies", NAME_REGEX, + requestBodyValidator); + validateMap(swagger.getHeaders(), results, false, "collections/headers", NAME_REGEX, headerValidator); + validateMap(swagger.getSecuritySchemes(), results, false, "collections/securitySchemes", NAME_REGEX, + securitySchemeValidator); + validateMap(swagger.getLinks(), results, false, "collections/links", NAME_REGEX, linkValidator); + validateMap(swagger.getCallbacks(), results, false, "collections/callbacks", NAME_REGEX, + callbackValidator); + validateMap(swagger.getComponentsExtensions(), results, false, "collections", EXT_REGEX, null); + validateList(swagger.getSecurityRequirements(), swagger.hasSecurityRequirements(), results, false, + "security", securityRequirementValidator); + validateList(swagger.getTags(), swagger.hasTags(), results, false, "tags", tagValidator); + validateField(swagger.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); + validateExtensions(swagger.getExtensions(), results); + } + }); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OperationValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OperationValidator.java index 4aaa8b1e..27687570 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OperationValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/OperationValidator.java @@ -27,44 +27,45 @@ public class OperationValidator extends ObjectValidatorBase { - @Inject - private Validator externalDocsValidator; - @Inject - private Validator parameterValidator; - @Inject - private Validator requestBodyValidator; - @Inject - private Validator responseValidator; - @Inject - private Validator callbackValidator; - @Inject - private Validator securityRequirementValidator; - @Inject - private Validator serverValidator; + @Inject + private Validator externalDocsValidator; + @Inject + private Validator parameterValidator; + @Inject + private Validator requestBodyValidator; + @Inject + private Validator responseValidator; + @Inject + private Validator callbackValidator; + @Inject + private Validator securityRequirementValidator; + @Inject + private Validator serverValidator; - @Override - public void validateObject(Operation operation, ValidationResults results) { - // no validation for: tags, description, deprecated - checkSummaryLength(operation, results); - validateField(operation.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); - // TODO Q: Not marked as required in spec, but spec says they all must be unique - // within the API. Seems like it - // should be required. - validateString(operation.getOperationId(), results, false, "operationId"); - validateList(operation.getParameters(), operation.hasParameters(), results, false, "parameters", - parameterValidator); - validateField(operation.getRequestBody(false), results, false, "requestBody", requestBodyValidator); - validateMap(operation.getResponses(), results, true, "responses", Regexes.RESPONSE_REGEX, responseValidator); - validateMap(operation.getCallbacks(), results, false, "callbacks", Regexes.NOEXT_REGEX, callbackValidator); - validateList(operation.getSecurityRequirements(), operation.hasSecurityRequirements(), results, false, - "security", securityRequirementValidator); - validateList(operation.getServers(), operation.hasServers(), results, false, "servers", serverValidator); - } + @Override + public void validateObject(Operation operation, ValidationResults results) { + // no validation for: tags, description, deprecated + checkSummaryLength(operation, results); + validateField(operation.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); + // TODO Q: Not marked as required in spec, but spec says they all must + // be unique + // within the API. Seems like it + // should be required. + validateString(operation.getOperationId(), results, false, "operationId"); + validateList(operation.getParameters(), operation.hasParameters(), results, false, "parameters", + parameterValidator); + validateField(operation.getRequestBody(false), results, false, "requestBody", requestBodyValidator); + validateMap(operation.getResponses(), results, true, "responses", Regexes.RESPONSE_REGEX, responseValidator); + validateMap(operation.getCallbacks(), results, false, "callbacks", Regexes.NOEXT_REGEX, callbackValidator); + validateList(operation.getSecurityRequirements(), operation.hasSecurityRequirements(), results, false, + "security", securityRequirementValidator); + validateList(operation.getServers(), operation.hasServers(), results, false, "servers", serverValidator); + } - private void checkSummaryLength(Operation operation, ValidationResults results) { - String summary = operation.getSummary(); - if (summary != null && summary.length() > 120) { - results.addWarning(m.msg("LongSummary|Sumamry exceeds recommended limit of 120 chars"), "summary"); - } + private void checkSummaryLength(Operation operation, ValidationResults results) { + String summary = operation.getSummary(); + if (summary != null && summary.length() > 120) { + results.addWarning(m.msg("LongSummary|Sumamry exceeds recommended limit of 120 chars"), "summary"); } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ParameterValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ParameterValidator.java index c94da505..86b83c43 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ParameterValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ParameterValidator.java @@ -25,65 +25,66 @@ public class ParameterValidator extends ObjectValidatorBase { - @Inject - private Validator schemaValidator; - @Inject - private Validator mediaTypeValidator; + @Inject + private Validator schemaValidator; + @Inject + private Validator mediaTypeValidator; - @Override - public void validateObject(Parameter parameter, ValidationResults results) { - // no validations for: description, deprecated, allowEmptyValue, explode, - // example, examples - validateString(parameter.getName(), results, true, "name"); - validateString(parameter.getIn(), results, true, Regexes.PARAM_IN_REGEX, "in"); - checkPathParam(parameter, results); - checkRequired(parameter, results); - validateString(parameter.getStyle(), results, false, Regexes.STYLE_REGEX, "style"); - checkAllowReserved(parameter, results); - // TODO Q: Should schema be required in parameter object? - validateField(parameter.getSchema(false), results, false, "schema", schemaValidator); - validateMap(parameter.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, - mediaTypeValidator); - validateExtensions(parameter.getExtensions(), results); - } + @Override + public void validateObject(Parameter parameter, ValidationResults results) { + // no validations for: description, deprecated, allowEmptyValue, + // explode, + // example, examples + validateString(parameter.getName(), results, true, "name"); + validateString(parameter.getIn(), results, true, Regexes.PARAM_IN_REGEX, "in"); + checkPathParam(parameter, results); + checkRequired(parameter, results); + validateString(parameter.getStyle(), results, false, Regexes.STYLE_REGEX, "style"); + checkAllowReserved(parameter, results); + // TODO Q: Should schema be required in parameter object? + validateField(parameter.getSchema(false), results, false, "schema", schemaValidator); + validateMap(parameter.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, + mediaTypeValidator); + validateExtensions(parameter.getExtensions(), results); + } - private void checkPathParam(Parameter parameter, ValidationResults results) { - if (parameter.getIn() != null && parameter.getIn().equals("path") && parameter.getName() != null) { - String path = getPathString(parameter); - if (path != null) { - if (!path.matches(".*/\\{" + parameter.getName() + "\\}(/.*)?")) { - results.addError(m.msg("MissingPathTplt|No template for path parameter in path string", - parameter.getName(), path), "name"); - } - } else { - results.addWarning( - m.msg("NoPath|Could not locate path for parameter", parameter.getName(), parameter.getIn())); - } + private void checkPathParam(Parameter parameter, ValidationResults results) { + if (parameter.getIn() != null && parameter.getIn().equals("path") && parameter.getName() != null) { + String path = getPathString(parameter); + if (path != null) { + if (!path.matches(".*/\\{" + parameter.getName() + "\\}(/.*)?")) { + results.addError(m.msg("MissingPathTplt|No template for path parameter in path string", + parameter.getName(), path), "name"); } + } else { + results.addWarning( + m.msg("NoPath|Could not locate path for parameter", parameter.getName(), parameter.getIn())); + } } + } - private void checkRequired(Parameter parameter, ValidationResults results) { - if ("path".equals(parameter.getIn())) { - if (parameter.getRequired() != Boolean.TRUE) { - results.addError( - m.msg("PathParamReq|Path param must have 'required' property set true", parameter.getName()), - "required"); - } - } + private void checkRequired(Parameter parameter, ValidationResults results) { + if ("path".equals(parameter.getIn())) { + if (parameter.getRequired() != Boolean.TRUE) { + results.addError( + m.msg("PathParamReq|Path param must have 'required' property set true", parameter.getName()), + "required"); + } } + } - private void checkAllowReserved(Parameter parameter, ValidationResults results) { - if (parameter.isAllowReserved() && !"query".equals(parameter.getIn())) { - results.addWarning(m.msg("NonQryAllowRsvd|AllowReserved is ignored for non-query parameter", - parameter.getName(), parameter.getIn()), "allowReserved"); - } + private void checkAllowReserved(Parameter parameter, ValidationResults results) { + if (parameter.isAllowReserved() && !"query".equals(parameter.getIn())) { + results.addWarning(m.msg("NonQryAllowRsvd|AllowReserved is ignored for non-query parameter", + parameter.getName(), parameter.getIn()), "allowReserved"); } + } - private String getPathString(Parameter parameter) { - PropertiesOverlay parent = Overlay.of(parameter).getParentPropertiesOverlay(); - while (parent != null && !(parent instanceof Path)) { - parent = Overlay.of(parent).getParentPropertiesOverlay(); - } - return parent != null && parent instanceof Path ? Overlay.getPathInParent(parent) : null; + private String getPathString(Parameter parameter) { + PropertiesOverlay parent = Overlay.of(parameter).getParentPropertiesOverlay(); + while (parent != null && !(parent instanceof Path)) { + parent = Overlay.of(parent).getParentPropertiesOverlay(); } + return parent != null && parent instanceof Path ? Overlay.getPathInParent(parent) : null; + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/PathValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/PathValidator.java index 6a76ef82..4f777e85 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/PathValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/PathValidator.java @@ -21,19 +21,19 @@ public class PathValidator extends ObjectValidatorBase { - @Inject - private Validator operationValidator; - @Inject - private Validator serverValidator; - @Inject - private Validator parameterValidator; + @Inject + private Validator operationValidator; + @Inject + private Validator serverValidator; + @Inject + private Validator parameterValidator; - @Override - public void validateObject(Path path, ValidationResults results) { - // no validation for: summary, description - validateMap(path.getOperations(), results, false, null, Regexes.METHOD_REGEX, operationValidator); - validateList(path.getServers(), path.hasServers(), results, false, "servers", serverValidator); - validateList(path.getParameters(), path.hasParameters(), results, false, "parameters", parameterValidator); - validateExtensions(path.getExtensions(), results); - } + @Override + public void validateObject(Path path, ValidationResults results) { + // no validation for: summary, description + validateMap(path.getOperations(), results, false, null, Regexes.METHOD_REGEX, operationValidator); + validateList(path.getServers(), path.hasServers(), results, false, "servers", serverValidator); + validateList(path.getParameters(), path.hasParameters(), results, false, "parameters", parameterValidator); + validateExtensions(path.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/Regexes.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/Regexes.java index 5d46ba43..b5ca9aa1 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/Regexes.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/Regexes.java @@ -14,14 +14,14 @@ public class Regexes { - public static final Pattern PATH_REGEX = Pattern.compile("/.*"); - public static final Pattern EXT_REGEX = Pattern.compile("x-.+"); - public static final Pattern NOEXT_REGEX = Pattern.compile("(?!x-).*"); - public static final Pattern NAME_REGEX = Pattern.compile("[a-zA-Z0-9\\._-]+"); - public static final Pattern NOEXT_NAME_REGEX = Pattern.compile("(?!x-)[a-zA-Z0-9\\._-]+"); - public static final Pattern METHOD_REGEX = Pattern.compile("get|put|post|delete|options|head|patch|trace"); - public static final Pattern PARAM_IN_REGEX = Pattern.compile("path|query|header|cookie"); - public static final Pattern STYLE_REGEX = Pattern - .compile("matrix|label|form|simple|spaceDelimited|pipeDelimited|deepObject"); - public static final Pattern RESPONSE_REGEX = Pattern.compile("default|\\d\\d\\d"); + public static final Pattern PATH_REGEX = Pattern.compile("/.*"); + public static final Pattern EXT_REGEX = Pattern.compile("x-.+"); + public static final Pattern NOEXT_REGEX = Pattern.compile("(?!x-).*"); + public static final Pattern NAME_REGEX = Pattern.compile("[a-zA-Z0-9\\._-]+"); + public static final Pattern NOEXT_NAME_REGEX = Pattern.compile("(?!x-)[a-zA-Z0-9\\._-]+"); + public static final Pattern METHOD_REGEX = Pattern.compile("get|put|post|delete|options|head|patch|trace"); + public static final Pattern PARAM_IN_REGEX = Pattern.compile("path|query|header|cookie"); + public static final Pattern STYLE_REGEX = Pattern + .compile("matrix|label|form|simple|spaceDelimited|pipeDelimited|deepObject"); + public static final Pattern RESPONSE_REGEX = Pattern.compile("default|\\d\\d\\d"); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/RequestBodyValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/RequestBodyValidator.java index a2cd1830..1306f1ac 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/RequestBodyValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/RequestBodyValidator.java @@ -19,15 +19,15 @@ public class RequestBodyValidator extends ObjectValidatorBase { - @Inject - private Validator mediaTypeValidator; + @Inject + private Validator mediaTypeValidator; - @Override - public void validateObject(RequestBody requestBody, ValidationResults results) { - // no validation for: description, required - validateMap(requestBody.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, - mediaTypeValidator); - validateExtensions(requestBody.getExtensions(), results); - } + @Override + public void validateObject(RequestBody requestBody, ValidationResults results) { + // no validation for: description, required + validateMap(requestBody.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, + mediaTypeValidator); + validateExtensions(requestBody.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ResponseValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ResponseValidator.java index 50dd046c..14b8d812 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ResponseValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ResponseValidator.java @@ -21,19 +21,19 @@ public class ResponseValidator extends ObjectValidatorBase { - @Inject - private Validator
headerValidator; - @Inject - private Validator mediaTypeValidator; - @Inject - private Validator linkValidator; + @Inject + private Validator
headerValidator; + @Inject + private Validator mediaTypeValidator; + @Inject + private Validator linkValidator; - @Override - public void validateObject(Response response, ValidationResults results) { - validateMap(response.getHeaders(), results, false, "headers", null, headerValidator); - validateMap(response.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, - mediaTypeValidator); - validateMap(response.getLinks(), results, false, "links", Regexes.NOEXT_NAME_REGEX, linkValidator); - validateExtensions(response.getExtensions(), results); - } + @Override + public void validateObject(Response response, ValidationResults results) { + validateMap(response.getHeaders(), results, false, "headers", null, headerValidator); + validateMap(response.getContentMediaTypes(), results, false, "content", Regexes.NOEXT_REGEX, + mediaTypeValidator); + validateMap(response.getLinks(), results, false, "links", Regexes.NOEXT_NAME_REGEX, linkValidator); + validateExtensions(response.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SchemaValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SchemaValidator.java index 7a365f84..958678bd 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SchemaValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SchemaValidator.java @@ -24,71 +24,73 @@ public class SchemaValidator extends ObjectValidatorBase { - @Inject - private Validator xmlValidator; - @Inject - private Validator externalDocsValidator; - @Inject - private Validator exampleValidator; + @Inject + private Validator xmlValidator; + @Inject + private Validator externalDocsValidator; + @Inject + private Validator exampleValidator; - @Override - public void validateObject(Schema schema, ValidationResults results) { - // no validation for: title, description, maximum, exclusiveMaximum, minimum - // exclusiveMinimum, uniqueItems, - // nullable, example, deprecated - validatePositive(schema.getMultipleOf(), results, false, "multipleOf"); - validateNonNegative(schema.getMaxLength(), results, false, "maxLength"); - validateNonNegative(schema.getMinLength(), results, false, "minLength"); - validatePattern(schema.getPattern(), results, false, "pattern"); - validateNonNegative(schema.getMaximum(), results, false, "maxItems"); - validateNonNegative(schema.getMaximum(), results, false, "minItems"); - validateNonNegative(schema.getMaxProperties(), results, false, "maxProperties"); - validateNonNegative(schema.getMinProperties(), results, false, "minProperties"); - validateUnique(schema.getRequiredFields(), results, "required"); - validateList(schema.getEnums(), schema.hasEnums(), results, false, "enum", null); - validateNonEmpty(schema.getEnums(), schema.hasEnums(), results, "enum"); - validateUnique(schema.getEnums(), results, "enum"); - validateString(schema.getType(), results, false, "boolean|object|array|number|integer|string", "type"); - validateList(schema.getAllOfSchemas(), schema.hasAllOfSchemas(), results, false, "allOf", this); - validateList(schema.getOneOfSchemas(), schema.hasOneOfSchemas(), results, false, "oneOf", this); - validateList(schema.getAnyOfSchemas(), schema.hasAnyOfSchemas(), results, false, "anyOf", this); - if (schema.getNotSchema(false) != null && Overlay.of(schema.getNotSchema(false)).isPresent()) { - validate(schema.getNotSchema(false), results, "not"); - } - if (schema.getItemsSchema(false) != null && Overlay.of(schema.getItemsSchema(false)).isPresent()) { - validate(schema.getItemsSchema(false), results, "items"); - } - validateMap(schema.getProperties(), results, false, "properties", null, this); - validateFormat(schema.getFormat(), schema.getType(), results, "format"); - validateDefault(schema.getDefault(), schema.getType(), results, "default"); - checkDiscriminator(schema, results, "discriminator"); - checkReadWrite(schema, results); - validateField(schema.getXml(false), results, false, "xml", xmlValidator); - validateField(schema.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); - validateMap(schema.getExamples(), results, false, "examples", Regexes.NOEXT_NAME_REGEX, exampleValidator); - validateExtensions(schema.getExtensions(), results); + @Override + public void validateObject(Schema schema, ValidationResults results) { + // no validation for: title, description, maximum, exclusiveMaximum, + // minimum + // exclusiveMinimum, uniqueItems, + // nullable, example, deprecated + validatePositive(schema.getMultipleOf(), results, false, "multipleOf"); + validateNonNegative(schema.getMaxLength(), results, false, "maxLength"); + validateNonNegative(schema.getMinLength(), results, false, "minLength"); + validatePattern(schema.getPattern(), results, false, "pattern"); + validateNonNegative(schema.getMaximum(), results, false, "maxItems"); + validateNonNegative(schema.getMaximum(), results, false, "minItems"); + validateNonNegative(schema.getMaxProperties(), results, false, "maxProperties"); + validateNonNegative(schema.getMinProperties(), results, false, "minProperties"); + validateUnique(schema.getRequiredFields(), results, "required"); + validateList(schema.getEnums(), schema.hasEnums(), results, false, "enum", null); + validateNonEmpty(schema.getEnums(), schema.hasEnums(), results, "enum"); + validateUnique(schema.getEnums(), results, "enum"); + validateString(schema.getType(), results, false, "boolean|object|array|number|integer|string", "type"); + validateList(schema.getAllOfSchemas(), schema.hasAllOfSchemas(), results, false, "allOf", this); + validateList(schema.getOneOfSchemas(), schema.hasOneOfSchemas(), results, false, "oneOf", this); + validateList(schema.getAnyOfSchemas(), schema.hasAnyOfSchemas(), results, false, "anyOf", this); + if (schema.getNotSchema(false) != null && Overlay.of(schema.getNotSchema(false)).isPresent()) { + validate(schema.getNotSchema(false), results, "not"); } + if (schema.getItemsSchema(false) != null && Overlay.of(schema.getItemsSchema(false)).isPresent()) { + validate(schema.getItemsSchema(false), results, "items"); + } + validateMap(schema.getProperties(), results, false, "properties", null, this); + validateFormat(schema.getFormat(), schema.getType(), results, "format"); + validateDefault(schema.getDefault(), schema.getType(), results, "default"); + checkDiscriminator(schema, results, "discriminator"); + checkReadWrite(schema, results); + validateField(schema.getXml(false), results, false, "xml", xmlValidator); + validateField(schema.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); + validateMap(schema.getExamples(), results, false, "examples", Regexes.NOEXT_NAME_REGEX, exampleValidator); + validateExtensions(schema.getExtensions(), results); + } - private void checkDiscriminator(Schema schema, ValidationResults results, String crumb) { - String discriminator = schema.getDiscriminator(); - if (discriminator != null) { - if (!schema.getProperties().keySet().contains(discriminator)) { - results.addError(m.msg("DiscNotProp|The discriminator is not a property of this schema", discriminator), - crumb); - } - if (!schema.getRequiredFields().contains(discriminator)) { - results.addError( - m.msg("DiscNotReq|The discriminator property is not required in this schema", discriminator), - crumb); - } - } + private void checkDiscriminator(Schema schema, ValidationResults results, String crumb) { + String discriminator = schema.getDiscriminator(); + if (discriminator != null) { + if (!schema.getProperties().keySet().contains(discriminator)) { + results.addError(m.msg("DiscNotProp|The discriminator is not a property of this schema", discriminator), + crumb); + } + if (!schema.getRequiredFields().contains(discriminator)) { + results.addError( + m.msg("DiscNotReq|The discriminator property is not required in this schema", discriminator), + crumb); + } } + } - private void checkReadWrite(Schema schema, ValidationResults results) { - if (schema.isReadOnly() && schema.isWriteOnly()) { - // don't set crumb... this validation involves multiple fields so is tied to - // schema - results.addError(m.msg("ROnlyAndWOnly|Schema cannot be both ReadOnly and WriteOnly")); - } + private void checkReadWrite(Schema schema, ValidationResults results) { + if (schema.isReadOnly() && schema.isWriteOnly()) { + // don't set crumb... this validation involves multiple fields so is + // tied to + // schema + results.addError(m.msg("ROnlyAndWOnly|Schema cannot be both ReadOnly and WriteOnly")); } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecurityRequirementValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecurityRequirementValidator.java index ba3bdd7d..b5095414 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecurityRequirementValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecurityRequirementValidator.java @@ -25,29 +25,30 @@ public class SecurityRequirementValidator extends ObjectValidatorBase { - @Override - public void validateObject(SecurityRequirement securityRequirement, ValidationResults results) { - OpenApi3 model = Overlay.of(securityRequirement).getModel(); - Set definedSchemes = model.getSecuritySchemes().keySet(); - for (Entry entry : securityRequirement.getRequirements().entrySet()) { - if (!definedSchemes.contains(entry.getKey())) { - results.addError( - m.msg("UnkSecScheme|Security scheme not defined in components object", entry.getKey())); - } else { - String type = model.getSecurityScheme(entry.getKey()).getType(); - switch (type) { - case "oauth2": - case "openIdConnect": - // TODO Q: anything to test here? do we know what the allowed scope names are? - break; - default: - if (!entry.getValue().getParameters().isEmpty()) { - results.addError(Messages.m.msg( - "NonEmptySecReqParms|Security requirement parameters must be empty unless scheme type is oauth2 or openIdConnect", - entry.getKey(), type)); - } - } - } + @Override + public void validateObject(SecurityRequirement securityRequirement, ValidationResults results) { + OpenApi3 model = Overlay.of(securityRequirement).getModel(); + Set definedSchemes = model.getSecuritySchemes().keySet(); + for (Entry entry : securityRequirement.getRequirements().entrySet()) { + if (!definedSchemes.contains(entry.getKey())) { + results.addError( + m.msg("UnkSecScheme|Security scheme not defined in components object", entry.getKey())); + } else { + String type = model.getSecurityScheme(entry.getKey()).getType(); + switch (type) { + case "oauth2": + case "openIdConnect": + // TODO Q: anything to test here? do we know what the + // allowed scope names are? + break; + default: + if (!entry.getValue().getParameters().isEmpty()) { + results.addError(Messages.m.msg( + "NonEmptySecReqParms|Security requirement parameters must be empty unless scheme type is oauth2 or openIdConnect", + entry.getKey(), type)); + } } + } } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecuritySchemeValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecuritySchemeValidator.java index e12878f5..17c0d115 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecuritySchemeValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/SecuritySchemeValidator.java @@ -19,38 +19,38 @@ public class SecuritySchemeValidator extends ObjectValidatorBase { - @Inject - private Validator oauthFlowValidator; + @Inject + private Validator oauthFlowValidator; - @Override - public void validateObject(SecurityScheme securityScheme, ValidationResults results) { - // no validation for: description, bearerFormat - validateString(securityScheme.getType(), results, true, "apiKey|http|oauth2|openIdConnect", "type"); - switch (securityScheme.getType()) { - case "http": - validateString(securityScheme.getScheme(), results, true, "scheme"); - // If bearer validate bearerFormat - break; - case "apiKey": - validateString(securityScheme.getName(), results, true, "name"); - validateString(securityScheme.getIn(), results, true, "query|header|cookie", "in"); - break; - case "oauth2": - validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "flow.implicit", - oauthFlowValidator); - validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "flow.password", - oauthFlowValidator); - validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "flow.clientCredentials", - oauthFlowValidator); - validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "authorizationCode", - oauthFlowValidator); - validateExtensions(securityScheme.getOAuthFlowsExtensions(), results, "flow"); - break; - case "openIdConnect": - validateUrl(securityScheme.getOpenIdConnectUrl(), results, true, "openIdConnectUrl"); - break; - } - validateExtensions(securityScheme.getExtensions(), results); + @Override + public void validateObject(SecurityScheme securityScheme, ValidationResults results) { + // no validation for: description, bearerFormat + validateString(securityScheme.getType(), results, true, "apiKey|http|oauth2|openIdConnect", "type"); + switch (securityScheme.getType()) { + case "http": + validateString(securityScheme.getScheme(), results, true, "scheme"); + // If bearer validate bearerFormat + break; + case "apiKey": + validateString(securityScheme.getName(), results, true, "name"); + validateString(securityScheme.getIn(), results, true, "query|header|cookie", "in"); + break; + case "oauth2": + validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "flow.implicit", + oauthFlowValidator); + validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "flow.password", + oauthFlowValidator); + validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "flow.clientCredentials", + oauthFlowValidator); + validateField(securityScheme.getImplicitOAuthFlow(false), results, false, "authorizationCode", + oauthFlowValidator); + validateExtensions(securityScheme.getOAuthFlowsExtensions(), results, "flow"); + break; + case "openIdConnect": + validateUrl(securityScheme.getOpenIdConnectUrl(), results, true, "openIdConnectUrl"); + break; } + validateExtensions(securityScheme.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerValidator.java index 6f4ad44c..fa96f8c7 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerValidator.java @@ -21,14 +21,14 @@ public class ServerValidator extends ObjectValidatorBase { - @Inject - private Validator serverVariableValidator; + @Inject + private Validator serverVariableValidator; - @Override - public void validateObject(Server server, ValidationResults results) { - // no validation for: description - validateUrl(server.getUrl(), results, false, "url", true); - validateMap(server.getServerVariables(), results, false, "variables", NAME_REGEX, serverVariableValidator); - validateExtensions(server.getExtensions(), results); - } + @Override + public void validateObject(Server server, ValidationResults results) { + // no validation for: description + validateUrl(server.getUrl(), results, false, "url", true); + validateMap(server.getServerVariables(), results, false, "variables", NAME_REGEX, serverVariableValidator); + validateExtensions(server.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerVariableValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerVariableValidator.java index eec428f7..9cca377e 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerVariableValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ServerVariableValidator.java @@ -19,39 +19,39 @@ public class ServerVariableValidator extends ObjectValidatorBase { - @Override - public void validateObject(final ServerVariable variable, final ValidationResults results) { - results.withCrumb("enum", new Runnable() { - @Override - public void run() { - int i = 0; - for (Object primitive : variable.getEnumValues()) { - checkPrimitive(primitive, results, i++); - } - } - }); - results.withCrumb("default", new Runnable() { - @Override - public void run() { - checkPrimitive(variable.getDefault(), results, "default"); - } - }); - validateString(variable.getDescription(), results, false, "description"); - } + @Override + public void validateObject(final ServerVariable variable, final ValidationResults results) { + results.withCrumb("enum", new Runnable() { + @Override + public void run() { + int i = 0; + for (Object primitive : variable.getEnumValues()) { + checkPrimitive(primitive, results, i++); + } + } + }); + results.withCrumb("default", new Runnable() { + @Override + public void run() { + checkPrimitive(variable.getDefault(), results, "default"); + } + }); + validateString(variable.getDescription(), results, false, "description"); + } - private void checkPrimitive(Object primitive, ValidationResults results, int index) { - checkPrimitive(primitive, results, "[" + index + "]"); - } + private void checkPrimitive(Object primitive, ValidationResults results, int index) { + checkPrimitive(primitive, results, "[" + index + "]"); + } - private void checkPrimitive(final Object primitive, ValidationResults results, String crumb) { - if (!(primitive instanceof String || primitive instanceof Number || primitive instanceof Boolean)) { - results.withCrumb(crumb, new Runnable() { - @Override - public void run() { - Messages.m.msg("BadPrimitive|Invalid primitive value", String.valueOf(primitive), - (primitive != null ? primitive.getClass() : NullType.class).getName()); - } - }); + private void checkPrimitive(final Object primitive, ValidationResults results, String crumb) { + if (!(primitive instanceof String || primitive instanceof Number || primitive instanceof Boolean)) { + results.withCrumb(crumb, new Runnable() { + @Override + public void run() { + Messages.m.msg("BadPrimitive|Invalid primitive value", String.valueOf(primitive), + (primitive != null ? primitive.getClass() : NullType.class).getName()); } + }); } + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/TagValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/TagValidator.java index 73e99494..0e1902dc 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/TagValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/TagValidator.java @@ -19,14 +19,14 @@ public class TagValidator extends ObjectValidatorBase { - @Inject - private Validator externalDocsValidator; + @Inject + private Validator externalDocsValidator; - @Override - public void validateObject(Tag tag, ValidationResults results) { - validateString(tag.getName(), results, true, "name"); - validateField(tag.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); - validateExtensions(tag.getExtensions(), results); - } + @Override + public void validateObject(Tag tag, ValidationResults results) { + validateString(tag.getName(), results, true, "name"); + validateField(tag.getExternalDocs(false), results, false, "externalDocs", externalDocsValidator); + validateExtensions(tag.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ValidationConfigurator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ValidationConfigurator.java index f5ff137c..43003d32 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ValidationConfigurator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ValidationConfigurator.java @@ -40,59 +40,59 @@ public abstract class ValidationConfigurator extends AbstractModule { - @Override - protected void configure() { - bind(new TypeLiteral>() { - }).to(CallbackValidator.class); - bind(new TypeLiteral>() { - }).to(ContactValidator.class); - bind(new TypeLiteral>() { - }).to(EncodingPropertyValidator.class); - bind(new TypeLiteral>() { - }).to(ExampleValidator.class); - bind(new TypeLiteral>() { - }).to(ExternalDocsValidator.class); - bind(new TypeLiteral>() { - }).to(HeaderValidator.class); - bind(new TypeLiteral>() { - }).to(InfoValidator.class); - bind(new TypeLiteral>() { - }).to(LicenseValidator.class); - bind(new TypeLiteral>() { - }).to(LinkValidator.class); - bind(new TypeLiteral>() { - }).to(MediaTypeValidator.class); - bind(new TypeLiteral>() { - }).to(OAuthFlowValidator.class); - bind(new TypeLiteral>() { - }).to(OperationValidator.class); - bind(new TypeLiteral>() { - }).to(ParameterValidator.class); - bind(new TypeLiteral>() { - }).to(PathValidator.class); - bind(new TypeLiteral>() { - }).to(RequestBodyValidator.class); - bind(new TypeLiteral>() { - }).to(ResponseValidator.class); - bind(new TypeLiteral>() { - }).to(SchemaValidator.class); - bind(new TypeLiteral>() { - }).to(SecurityRequirementValidator.class); - bind(new TypeLiteral>() { - }).to(SecuritySchemeValidator.class); - bind(new TypeLiteral>() { - }).to(ServerValidator.class); - bind(new TypeLiteral>() { - }).to(ServerVariableValidator.class); - bind(new TypeLiteral>() { - }).to(OpenApi3Validator.class); - bind(new TypeLiteral>() { - }).to(TagValidator.class); - bind(new TypeLiteral>() { - }).to(XmlValidator.class); + @Override + protected void configure() { + bind(new TypeLiteral>() { + }).to(CallbackValidator.class); + bind(new TypeLiteral>() { + }).to(ContactValidator.class); + bind(new TypeLiteral>() { + }).to(EncodingPropertyValidator.class); + bind(new TypeLiteral>() { + }).to(ExampleValidator.class); + bind(new TypeLiteral>() { + }).to(ExternalDocsValidator.class); + bind(new TypeLiteral>() { + }).to(HeaderValidator.class); + bind(new TypeLiteral>() { + }).to(InfoValidator.class); + bind(new TypeLiteral>() { + }).to(LicenseValidator.class); + bind(new TypeLiteral>() { + }).to(LinkValidator.class); + bind(new TypeLiteral>() { + }).to(MediaTypeValidator.class); + bind(new TypeLiteral>() { + }).to(OAuthFlowValidator.class); + bind(new TypeLiteral>() { + }).to(OperationValidator.class); + bind(new TypeLiteral>() { + }).to(ParameterValidator.class); + bind(new TypeLiteral>() { + }).to(PathValidator.class); + bind(new TypeLiteral>() { + }).to(RequestBodyValidator.class); + bind(new TypeLiteral>() { + }).to(ResponseValidator.class); + bind(new TypeLiteral>() { + }).to(SchemaValidator.class); + bind(new TypeLiteral>() { + }).to(SecurityRequirementValidator.class); + bind(new TypeLiteral>() { + }).to(SecuritySchemeValidator.class); + bind(new TypeLiteral>() { + }).to(ServerValidator.class); + bind(new TypeLiteral>() { + }).to(ServerVariableValidator.class); + bind(new TypeLiteral>() { + }).to(OpenApi3Validator.class); + bind(new TypeLiteral>() { + }).to(TagValidator.class); + bind(new TypeLiteral>() { + }).to(XmlValidator.class); - configureImplValidators(); - } + configureImplValidators(); + } - protected abstract void configureImplValidators(); + protected abstract void configureImplValidators(); } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/XmlValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/XmlValidator.java index f2f65776..d60dfdd4 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/XmlValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/XmlValidator.java @@ -18,11 +18,11 @@ public class XmlValidator extends ObjectValidatorBase { - @Override - public void validateObject(Xml xml, ValidationResults results) { - // no validation for: name, prefix, attribute, wrapped - validateUrl(xml.getNamespace(), results, false, "namespace", false, Severity.WARNING); - validateExtensions(xml.getExtensions(), results); - } + @Override + public void validateObject(Xml xml, ValidationResults results) { + // no validation for: name, prefix, attribute, wrapped + validateUrl(xml.getNamespace(), results, false, "namespace", false, Severity.WARNING); + validateExtensions(xml.getExtensions(), results); + } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/ContactOverlayValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/ContactOverlayValidator.java index f0506d1b..617a8395 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/ContactOverlayValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/ContactOverlayValidator.java @@ -20,7 +20,7 @@ public class ContactOverlayValidator extends ObjectValidator implem @Override public void validateImpl(Contact contact, ValidationResults results) { - super.validate((ContactImpl) contact, results); + super.validate((ContactImpl) contact, results); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/InfoOverlayValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/InfoOverlayValidator.java index a0bc87c3..6534d5bb 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/InfoOverlayValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/InfoOverlayValidator.java @@ -20,7 +20,7 @@ public class InfoOverlayValidator extends ObjectValidator implements I @Override public void validateImpl(Info info, ValidationResults results) { - super.validate((InfoImpl) info, results); + super.validate((InfoImpl) info, results); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/OverlayValidationConfigurator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/OverlayValidationConfigurator.java index b89bf379..28557bd1 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/OverlayValidationConfigurator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/OverlayValidationConfigurator.java @@ -21,11 +21,11 @@ public class OverlayValidationConfigurator extends ValidationConfigurator { @Override protected void configureImplValidators() { - bind(new TypeLiteral>() { - }).to(Swagger3OverlayValidator.class); - bind(new TypeLiteral>() { - }).to(InfoOverlayValidator.class); - bind(new TypeLiteral>() { - }).to(ContactOverlayValidator.class); + bind(new TypeLiteral>() { + }).to(Swagger3OverlayValidator.class); + bind(new TypeLiteral>() { + }).to(InfoOverlayValidator.class); + bind(new TypeLiteral>() { + }).to(ContactOverlayValidator.class); } } diff --git a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/Swagger3OverlayValidator.java b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/Swagger3OverlayValidator.java index 42a8bf87..096b4e81 100755 --- a/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/Swagger3OverlayValidator.java +++ b/kaizen-openapi-parser/src/main/java/com/reprezen/kaizen/oasparser/val3/ovl/Swagger3OverlayValidator.java @@ -20,12 +20,12 @@ public class Swagger3OverlayValidator extends ObjectValidator impl @Override public void validate(OpenApi3Impl overlay, ValidationResults results) { - super.validate(overlay, results); + super.validate(overlay, results); } @Override public void validateImpl(OpenApi3 swagger3, ValidationResults results) { - validate((OpenApi3Impl) swagger3, results); + validate((OpenApi3Impl) swagger3, results); } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/BigParseTest.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/BigParseTest.java index 6b0fc5d5..bfe70afc 100755 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/BigParseTest.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/BigParseTest.java @@ -43,51 +43,51 @@ @RunWith(Parameterized.class) public class BigParseTest extends Assert { - @Parameters - public static Collection resources() { - return Arrays.asList(new Object[][] { new URL[] { BigParseTest.class.getResource("/models/parseTest.yaml") } }); - } + @Parameters + public static Collection resources() { + return Arrays.asList(new Object[][] { new URL[] { BigParseTest.class.getResource("/models/parseTest.yaml") } }); + } - @Parameter - public URL modelUrl; + @Parameter + public URL modelUrl; - @Test - public void test() throws Exception { - Object parsedYaml = new Yaml().load(modelUrl.openStream()); - JsonNode tree = new YAMLMapper().convertValue(parsedYaml, JsonNode.class); - final OpenApi3 model = (OpenApi3) new OpenApiParser().parse(modelUrl, false); - Predicate valueNodePredicate = new Predicate() { - @Override - public boolean apply(JsonNode node) { - return node.isValueNode(); - } - }; - WalkMethod valueChecker = new WalkMethod() { - @Override - public void run(JsonNode node, JsonPointer path) { - JsonOverlay overlay = Overlay.find((JsonOverlay) model, path); - Object value = overlay != null ? Overlay.get(overlay) : null; - assertNotNull("No overlay object found for path: " + path, overlay); - Object fromJson = getValue(node); - String msg = String.format("Wrong overlay value for path '%s': expected '%s', got '%s'", path, fromJson, - value); - assertEquals(msg, fromJson, value); - } - }; - JsonTreeWalker.walkTree(tree, valueNodePredicate, valueChecker); - } + @Test + public void test() throws Exception { + Object parsedYaml = new Yaml().load(modelUrl.openStream()); + JsonNode tree = new YAMLMapper().convertValue(parsedYaml, JsonNode.class); + final OpenApi3 model = (OpenApi3) new OpenApiParser().parse(modelUrl, false); + Predicate valueNodePredicate = new Predicate() { + @Override + public boolean apply(JsonNode node) { + return node.isValueNode(); + } + }; + WalkMethod valueChecker = new WalkMethod() { + @Override + public void run(JsonNode node, JsonPointer path) { + JsonOverlay overlay = Overlay.find((JsonOverlay) model, path); + Object value = overlay != null ? Overlay.get(overlay) : null; + assertNotNull("No overlay object found for path: " + path, overlay); + Object fromJson = getValue(node); + String msg = String.format("Wrong overlay value for path '%s': expected '%s', got '%s'", path, fromJson, + value); + assertEquals(msg, fromJson, value); + } + }; + JsonTreeWalker.walkTree(tree, valueNodePredicate, valueChecker); + } - private Object getValue(JsonNode node) { - if (node.isNumber()) { - return node.numberValue(); - } else if (node.isTextual()) { - return node.textValue(); - } else if (node.isBoolean()) { - return node.booleanValue(); - } else if (node.isNull()) { - return null; - } else { - throw new IllegalArgumentException("Non-value JSON node got through value node filter"); - } + private Object getValue(JsonNode node) { + if (node.isNumber()) { + return node.numberValue(); + } else if (node.isTextual()) { + return node.textValue(); + } else if (node.isBoolean()) { + return node.booleanValue(); + } else if (node.isNull()) { + return null; + } else { + throw new IllegalArgumentException("Non-value JSON node got through value node filter"); } + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExampleTest.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExampleTest.java index 919524bf..0088190e 100644 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExampleTest.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExampleTest.java @@ -26,49 +26,49 @@ public class ExampleTest { - private static OpenApi3 model; - private Map exampleFixture = ImmutableMap.of( // - "foo", "bar", // - "person", ImmutableMap.of( // - "name", "Paul")); + private static OpenApi3 model; + private Map exampleFixture = ImmutableMap.of( // + "foo", "bar", // + "person", ImmutableMap.of( // + "name", "Paul")); - @BeforeClass - public static void beforeClass() throws Exception { - model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/examplesTest.yaml"), true); - } + @BeforeClass + public static void beforeClass() throws Exception { + model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/examplesTest.yaml"), true); + } - @Test - public void testExample() { - Object example = model.getPath("/v2") // - .getOperation("get") // - .getResponse("203") // - .getContentMediaType("application/json") // - .getExample(); + @Test + public void testExample() { + Object example = model.getPath("/v2") // + .getOperation("get") // + .getResponse("203") // + .getContentMediaType("application/json") // + .getExample(); - assertEquals(exampleFixture, example); - } + assertEquals(exampleFixture, example); + } - @Test - public void testExamples() { - Map examples = model.getPath("/v2") // - .getOperation("get") // - .getResponse("200") // - .getContentMediaType("application/json") // - .getExamples(); + @Test + public void testExamples() { + Map examples = model.getPath("/v2") // + .getOperation("get") // + .getResponse("200") // + .getContentMediaType("application/json") // + .getExamples(); - assertEquals(1, examples.size()); - assertTrue(examples.containsKey("foo")); + assertEquals(1, examples.size()); + assertTrue(examples.containsKey("foo")); - Example example = examples.get("foo"); + Example example = examples.get("foo"); - assertEquals(exampleFixture, example.getValue()); - assertEquals("First Example", example.getSummary()); - assertEquals("An Example", example.getDescription()); - } + assertEquals(exampleFixture, example.getValue()); + assertEquals("First Example", example.getSummary()); + assertEquals("An Example", example.getDescription()); + } - @Test - public void testValidate() { - assertTrue(model.isValid()); - } + @Test + public void testValidate() { + assertTrue(model.isValid()); + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExamplesTest.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExamplesTest.java index 88e48ee5..52102487 100755 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExamplesTest.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/ExamplesTest.java @@ -34,59 +34,59 @@ @RunWith(Parameterized.class) public class ExamplesTest extends Assert { - private static final String SPEC_REPO = "OAI/OpenAPI-specification"; - private static final String EXAMPLES_BRANCH = "master"; - private static final String EXAMPLES_ROOT = "examples/v3.0"; + private static final String SPEC_REPO = "OAI/OpenAPI-specification"; + private static final String EXAMPLES_BRANCH = "master"; + private static final String EXAMPLES_ROOT = "examples/v3.0"; - @Parameters(name = "{index}: {1}") - public static Collection findExamples() throws IOException { - Collection examples = Lists.newArrayList(); - Deque dirs = Queues.newArrayDeque(); - String auth = System.getenv("GITHUB_AUTH") != null ? System.getenv("GITHUB_AUTH") + "@" : ""; - String request = String.format("https://%sapi.github.com/repos/%s/contents/%s?ref=%s", auth, SPEC_REPO, - EXAMPLES_ROOT, EXAMPLES_BRANCH); - dirs.add(new URL(request)); - while (!dirs.isEmpty()) { - URL url = dirs.remove(); - JsonNode tree = new JsonLoader().load(url); - for (JsonNode result : iterable(tree.elements())) { - String type = result.get("type").asText(); - String path = result.get("path").asText(); - String resultUrl = result.get("url").asText(); - if (type.equals("dir")) { - dirs.add(new URL(resultUrl)); - } else if (type.equals("file") && (path.endsWith(".yaml") || path.endsWith(".json"))) { - String downloadUrl = result.get("download_url").asText(); - examples.add(new Object[] { new URL(downloadUrl), result.get("name").asText() }); - } - } + @Parameters(name = "{index}: {1}") + public static Collection findExamples() throws IOException { + Collection examples = Lists.newArrayList(); + Deque dirs = Queues.newArrayDeque(); + String auth = System.getenv("GITHUB_AUTH") != null ? System.getenv("GITHUB_AUTH") + "@" : ""; + String request = String.format("https://%sapi.github.com/repos/%s/contents/%s?ref=%s", auth, SPEC_REPO, + EXAMPLES_ROOT, EXAMPLES_BRANCH); + dirs.add(new URL(request)); + while (!dirs.isEmpty()) { + URL url = dirs.remove(); + JsonNode tree = new JsonLoader().load(url); + for (JsonNode result : iterable(tree.elements())) { + String type = result.get("type").asText(); + String path = result.get("path").asText(); + String resultUrl = result.get("url").asText(); + if (type.equals("dir")) { + dirs.add(new URL(resultUrl)); + } else if (type.equals("file") && (path.endsWith(".yaml") || path.endsWith(".json"))) { + String downloadUrl = result.get("download_url").asText(); + examples.add(new Object[] { new URL(downloadUrl), result.get("name").asText() }); } - return examples; + } } + return examples; + } - @Parameter - public URL exampleUrl; + @Parameter + public URL exampleUrl; - @Parameter(1) - public String fileName; + @Parameter(1) + public String fileName; - @Test - public void exampleCanBeParsed() throws Exception { - if (!exampleUrl.toString().contains("callback-example")) { - OpenApi3 model = (OpenApi3) new OpenApiParser().parse(exampleUrl); - for (ValidationItem item : model.getValidationItems()) { - System.out.println(item); - } - assertTrue("Example was not valid: " + exampleUrl, model.isValid()); - } + @Test + public void exampleCanBeParsed() throws Exception { + if (!exampleUrl.toString().contains("callback-example")) { + OpenApi3 model = (OpenApi3) new OpenApiParser().parse(exampleUrl); + for (ValidationItem item : model.getValidationItems()) { + System.out.println(item); + } + assertTrue("Example was not valid: " + exampleUrl, model.isValid()); } + } - private static Iterable iterable(final Iterator iterator) { - return new Iterable() { - @Override - public Iterator iterator() { - return iterator; - } - }; - } + private static Iterable iterable(final Iterator iterator) { + return new Iterable() { + @Override + public Iterator iterator() { + return iterator; + } + }; + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/Issue131Test.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/Issue131Test.java index ee755eef..815ff612 100644 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/Issue131Test.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/Issue131Test.java @@ -11,16 +11,16 @@ public class Issue131Test extends Assert { - @Test - public void testSchemaRefs() throws Exception { - OpenApi3 model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/issue131.yaml"), true); - assertEquals("SampleData", Overlay.getPathInParent(Overlay.of(model).find("/components/schemas/SampleData"))); - assertEquals("MoreData", Overlay.getPathInParent(Overlay.of(model).find("/components/schemas/MoreData"))); - Schema direct = model.getSchema("SampleData"); - Schema viaMoreData = model.getSchema("MoreData").getProperty("master"); - Schema viaPath = model.getPath("/sampledatamanagement/v1/sampledata/custom/{id}").getGet().getResponse("200") - .getContentMediaType("application/json").getSchema(); - assertTrue(direct == viaMoreData); - assertTrue(direct == viaPath); - } + @Test + public void testSchemaRefs() throws Exception { + OpenApi3 model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/issue131.yaml"), true); + assertEquals("SampleData", Overlay.getPathInParent(Overlay.of(model).find("/components/schemas/SampleData"))); + assertEquals("MoreData", Overlay.getPathInParent(Overlay.of(model).find("/components/schemas/MoreData"))); + Schema direct = model.getSchema("SampleData"); + Schema viaMoreData = model.getSchema("MoreData").getProperty("master"); + Schema viaPath = model.getPath("/sampledatamanagement/v1/sampledata/custom/{id}").getGet().getResponse("200") + .getContentMediaType("application/json").getSchema(); + assertTrue(direct == viaMoreData); + assertTrue(direct == viaPath); + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/JsonTreeWalker.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/JsonTreeWalker.java index fbbd4b4e..774e928b 100755 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/JsonTreeWalker.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/JsonTreeWalker.java @@ -22,66 +22,66 @@ public class JsonTreeWalker { - public static void walkTree(JsonNode tree, Predicate nodeFilter, WalkMethod walkMethod) { - if (nodeFilter == null) { - nodeFilter = Predicates.alwaysTrue(); - } - new JsonTreeWalker(nodeFilter, walkMethod).walk(tree, JsonPointer.compile("")); + public static void walkTree(JsonNode tree, Predicate nodeFilter, WalkMethod walkMethod) { + if (nodeFilter == null) { + nodeFilter = Predicates.alwaysTrue(); } + new JsonTreeWalker(nodeFilter, walkMethod).walk(tree, JsonPointer.compile("")); + } - private Predicate nodeFilter; - private WalkMethod walkMethod; + private Predicate nodeFilter; + private WalkMethod walkMethod; - public JsonTreeWalker(Predicate nodeFilter, WalkMethod walkMethod) { - this.nodeFilter = nodeFilter; - this.walkMethod = walkMethod; - } + public JsonTreeWalker(Predicate nodeFilter, WalkMethod walkMethod) { + this.nodeFilter = nodeFilter; + this.walkMethod = walkMethod; + } - private void walk(JsonNode node, JsonPointer path) { - if (nodeFilter.apply(node)) { - visit(node, path); - } - walkChildren(node, path); + private void walk(JsonNode node, JsonPointer path) { + if (nodeFilter.apply(node)) { + visit(node, path); } + walkChildren(node, path); + } - private void visit(JsonNode node, JsonPointer path) { - walkMethod.run(node, path); - } + private void visit(JsonNode node, JsonPointer path) { + walkMethod.run(node, path); + } - private void walkChildren(JsonNode node, JsonPointer path) { - if (node instanceof ObjectNode) { - for (Entry field : iterable(node.fields())) { - walk(field.getValue(), childPointer(path, field.getKey())); - } - } else if (node instanceof ArrayNode) { - for (int i = 0; i < node.size(); i++) { - walk(node.get(i), childPointer(path, i)); - } - } + private void walkChildren(JsonNode node, JsonPointer path) { + if (node instanceof ObjectNode) { + for (Entry field : iterable(node.fields())) { + walk(field.getValue(), childPointer(path, field.getKey())); + } + } else if (node instanceof ArrayNode) { + for (int i = 0; i < node.size(); i++) { + walk(node.get(i), childPointer(path, i)); + } } + } - private JsonPointer childPointer(JsonPointer path, String childKey) { - return JsonPointer.compile(path + "/" + quote(childKey)); - } + private JsonPointer childPointer(JsonPointer path, String childKey) { + return JsonPointer.compile(path + "/" + quote(childKey)); + } - private JsonPointer childPointer(JsonPointer path, int index) { - return childPointer(path, Integer.toString(index)); - } + private JsonPointer childPointer(JsonPointer path, int index) { + return childPointer(path, Integer.toString(index)); + } - public String quote(String key) { - return key.replaceAll("~", "~0").replaceAll("/", "~1"); - } + public String quote(String key) { + return key.replaceAll("~", "~0").replaceAll("/", "~1"); + } - public static interface WalkMethod { - void run(JsonNode node, JsonPointer path); - } + public static interface WalkMethod { + void run(JsonNode node, JsonPointer path); + } - private Iterable iterable(final Iterator iterator) { - return new Iterable() { - @Override - public Iterator iterator() { - return iterator; - } - }; - } + private Iterable iterable(final Iterator iterator) { + return new Iterable() { + @Override + public Iterator iterator() { + return iterator; + } + }; + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/LinksTest.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/LinksTest.java index 5d73e4a3..e855d03f 100644 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/LinksTest.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/LinksTest.java @@ -21,16 +21,16 @@ public class LinksTest { - @Test - public void testLinks() throws Exception { - OpenApi3 model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/linksTest.yaml"), false); + @Test + public void testLinks() throws Exception { + OpenApi3 model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/linksTest.yaml"), false); - assertNotNull(model.getLink("PullRequestMerge").getOperationId()); - assertNotNull(model.getLink("PullRequestMerge").getOperationRef()); - assertNotNull(model.getLink("PullRequestMerge").getServer()); + assertNotNull(model.getLink("PullRequestMerge").getOperationId()); + assertNotNull(model.getLink("PullRequestMerge").getOperationRef()); + assertNotNull(model.getLink("PullRequestMerge").getServer()); - assertEquals("http://localhost", model.getLink("PullRequestMerge").getServer().getUrl()); - assertEquals("server", model.getLink("PullRequestMerge").getServer().getDescription()); - } + assertEquals("http://localhost", model.getLink("PullRequestMerge").getServer().getUrl()); + assertEquals("server", model.getLink("PullRequestMerge").getServer().getDescription()); + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/OverlayAdapterTests.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/OverlayAdapterTests.java index 46f9bb74..1de89d9a 100644 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/OverlayAdapterTests.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/OverlayAdapterTests.java @@ -24,72 +24,72 @@ public class OverlayAdapterTests extends Assert { - private OpenApi3 model; + private OpenApi3 model; - @Before - public void setup() throws Exception { - this.model = parseLocalModel("linksTest"); - } + @Before + public void setup() throws Exception { + this.model = parseLocalModel("linksTest"); + } - @Test - public void testPropertiesAdapter() { - assertTrue(model == Overlay.of(model).get()); - assertTrue(model.getInfo() == new Overlay(model.getInfo()).get()); - } + @Test + public void testPropertiesAdapter() { + assertTrue(model == Overlay.of(model).get()); + assertTrue(model.getInfo() == new Overlay(model.getInfo()).get()); + } - @Test - public void testFieldAdapter() { - assertEquals(model.getOpenApi(), Overlay.of(model, "openApi", String.class).get()); - @SuppressWarnings("unchecked") - Map pathsMapOverlay = Overlay.of(model, "paths", Map.class).get(); - assertTrue(model.getPath("/2.0/users/{username}") == pathsMapOverlay.get("/2.0/users/{username}")); - } + @Test + public void testFieldAdapter() { + assertEquals(model.getOpenApi(), Overlay.of(model, "openApi", String.class).get()); + @SuppressWarnings("unchecked") + Map pathsMapOverlay = Overlay.of(model, "paths", Map.class).get(); + assertTrue(model.getPath("/2.0/users/{username}") == pathsMapOverlay.get("/2.0/users/{username}")); + } - @Test - public void testMapAdapter() { - Overlay mapOverlay = Overlay.of(model, "paths", Map.class); - assertTrue(mapOverlay.getMapOverlay() instanceof MapOverlay); - @SuppressWarnings("unchecked") - MapOverlay castMapOverlay = (MapOverlay) mapOverlay.getMapOverlay(); - Path path = Overlay.of(castMapOverlay, "/2.0/users/{username}").get(); - assertTrue(model.getPath("/2.0/users/{username}") == path); - } + @Test + public void testMapAdapter() { + Overlay mapOverlay = Overlay.of(model, "paths", Map.class); + assertTrue(mapOverlay.getMapOverlay() instanceof MapOverlay); + @SuppressWarnings("unchecked") + MapOverlay castMapOverlay = (MapOverlay) mapOverlay.getMapOverlay(); + Path path = Overlay.of(castMapOverlay, "/2.0/users/{username}").get(); + assertTrue(model.getPath("/2.0/users/{username}") == path); + } - @Test - public void testListAdapter() { - Operation method = model.getPath("/2.0/repositories/{username}/{slug}").getGet(); - Overlay listOverlay = Overlay.of(method, "parameters", Collection.class); - assertTrue(listOverlay.getListOverlay() instanceof ListOverlay); - @SuppressWarnings("unchecked") - ListOverlay castListOverlay = (ListOverlay) listOverlay.getListOverlay(); - Parameter param = Overlay.of(castListOverlay, 1).get(); - assertTrue(method.getParameter(1) == param); - } + @Test + public void testListAdapter() { + Operation method = model.getPath("/2.0/repositories/{username}/{slug}").getGet(); + Overlay listOverlay = Overlay.of(method, "parameters", Collection.class); + assertTrue(listOverlay.getListOverlay() instanceof ListOverlay); + @SuppressWarnings("unchecked") + ListOverlay castListOverlay = (ListOverlay) listOverlay.getListOverlay(); + Parameter param = Overlay.of(castListOverlay, 1).get(); + assertTrue(method.getParameter(1) == param); + } - @Test - public void testReferences() { - // props reference - Response resp200 = model.getPath("/2.0/users/{username}").getGet().getResponse("200"); - assertFalse(Overlay.of(resp200).isReference("description")); - assertTrue(Overlay.of(resp200.getContentMediaType("application/json")).isReference("schema")); - assertEquals("#/components/schemas/user", - Overlay.of(resp200.getContentMediaType("application/json")).getReference("schema").getRefString()); + @Test + public void testReferences() { + // props reference + Response resp200 = model.getPath("/2.0/users/{username}").getGet().getResponse("200"); + assertFalse(Overlay.of(resp200).isReference("description")); + assertTrue(Overlay.of(resp200.getContentMediaType("application/json")).isReference("schema")); + assertEquals("#/components/schemas/user", + Overlay.of(resp200.getContentMediaType("application/json")).getReference("schema").getRefString()); - // map reference - assertFalse(Overlay.of(model, "schemas", Schema.class).isReference("user")); - assertTrue(Overlay.of(model.getSchema("repository").getProperties()).isReference("owner")); - assertEquals("#/components/schemas/user", - Overlay.of(model.getSchema("repository").getProperties()).getReference("owner").getRefString()); + // map reference + assertFalse(Overlay.of(model, "schemas", Schema.class).isReference("user")); + assertTrue(Overlay.of(model.getSchema("repository").getProperties()).isReference("owner")); + assertEquals("#/components/schemas/user", + Overlay.of(model.getSchema("repository").getProperties()).getReference("owner").getRefString()); - // list reference - List params = model.getPath("/2.0/repositories/{username}/{slug}").getGet().getParameters(); - assertFalse(Overlay.of(params).isReference(1)); - assertTrue(Overlay.of(params).isReference(0)); - assertEquals("#/components/parameters/username", Overlay.of(params).getReference(0).getRefString()); - } + // list reference + List params = model.getPath("/2.0/repositories/{username}/{slug}").getGet().getParameters(); + assertFalse(Overlay.of(params).isReference(1)); + assertTrue(Overlay.of(params).isReference(0)); + assertEquals("#/components/parameters/username", Overlay.of(params).getReference(0).getRefString()); + } - private static OpenApi3 parseLocalModel(String name) throws Exception { - URL url = SimpleSerializationTest.class.getResource("/models/" + name + ".yaml"); - return (OpenApi3) new OpenApiParser().parse(url); - } + private static OpenApi3 parseLocalModel(String name) throws Exception { + URL url = SimpleSerializationTest.class.getResource("/models/" + name + ".yaml"); + return (OpenApi3) new OpenApiParser().parse(url); + } } \ No newline at end of file diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/PathsTest.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/PathsTest.java index f1064da2..a041fbde 100644 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/PathsTest.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/PathsTest.java @@ -22,17 +22,17 @@ public class PathsTest { - @Test - public void testGetPaths() throws Exception { - OpenApi3 model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/pathsTest.yaml"), false); + @Test + public void testGetPaths() throws Exception { + OpenApi3 model = (OpenApi3) new OpenApiParser().parse(Resources.getResource("models/pathsTest.yaml"), false); - assertEquals(2, model.getPaths().size()); - assertTrue(model.hasPath("/")); - assertTrue(model.hasPath("/v2")); - assertEquals("/", model.getPath("/").getPathString()); - assertEquals("/v2", model.getPath("/v2").getPathString()); - assertNotNull(model.getPath("/")); - assertNotNull(model.getPath("/v2")); - } + assertEquals(2, model.getPaths().size()); + assertTrue(model.hasPath("/")); + assertTrue(model.hasPath("/v2")); + assertEquals("/", model.getPath("/").getPathString()); + assertEquals("/v2", model.getPath("/v2").getPathString()); + assertNotNull(model.getPath("/")); + assertNotNull(model.getPath("/v2")); + } } diff --git a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/SimpleSerializationTest.java b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/SimpleSerializationTest.java index 03b49016..7ee72cef 100644 --- a/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/SimpleSerializationTest.java +++ b/kaizen-openapi-parser/src/test/java/com/reprezen/swaggerparser/test/SimpleSerializationTest.java @@ -42,93 +42,94 @@ @RunWith(Enclosed.class) public class SimpleSerializationTest extends Assert { - private static final String SPEC_REPO = "OAI/OpenAPI-Specification"; - private static final String EXAMPLES_BRANCH = "master"; - private static final String EXAMPLES_ROOT = "examples/v3.0"; + private static final String SPEC_REPO = "OAI/OpenAPI-Specification"; + private static final String EXAMPLES_BRANCH = "master"; + private static final String EXAMPLES_ROOT = "examples/v3.0"; - private static ObjectMapper mapper = new ObjectMapper(); - private static ObjectMapper yamlMapper = new YAMLMapper(); + private static ObjectMapper mapper = new ObjectMapper(); + private static ObjectMapper yamlMapper = new YAMLMapper(); - @RunWith(Parameterized.class) - public static class ParameterizedTests extends Assert { - @Parameters(name = "{index}: {1}") - public static Collection findExamples() throws IOException { - Collection examples = Lists.newArrayList(); - Deque dirs = Queues.newArrayDeque(); - String auth = System.getenv("GITHUB_AUTH") != null ? System.getenv("GITHUB_AUTH") + "@" : ""; - String request = String.format("https://%sapi.github.com/repos/%s/contents/%s?ref=%s", auth, SPEC_REPO, - EXAMPLES_ROOT, EXAMPLES_BRANCH); - dirs.add(new URL(request)); - while (!dirs.isEmpty()) { - URL url = dirs.remove(); - JsonNode tree = new JsonLoader().load(url); - for (JsonNode result : iterable(tree.elements())) { - String type = result.get("type").asText(); - String path = result.get("path").asText(); - String resultUrl = result.get("url").asText(); - if (type.equals("dir")) { - dirs.add(new URL(resultUrl)); - } else if (type.equals("file") && (path.endsWith(".yaml") || path.endsWith(".json"))) { - String downloadUrl = result.get("download_url").asText(); - examples.add(new Object[] { new URL(downloadUrl), result.get("name").asText() }); - } - } - } - return examples; + @RunWith(Parameterized.class) + public static class ParameterizedTests extends Assert { + @Parameters(name = "{index}: {1}") + public static Collection findExamples() throws IOException { + Collection examples = Lists.newArrayList(); + Deque dirs = Queues.newArrayDeque(); + String auth = System.getenv("GITHUB_AUTH") != null ? System.getenv("GITHUB_AUTH") + "@" : ""; + String request = String.format("https://%sapi.github.com/repos/%s/contents/%s?ref=%s", auth, SPEC_REPO, + EXAMPLES_ROOT, EXAMPLES_BRANCH); + dirs.add(new URL(request)); + while (!dirs.isEmpty()) { + URL url = dirs.remove(); + JsonNode tree = new JsonLoader().load(url); + for (JsonNode result : iterable(tree.elements())) { + String type = result.get("type").asText(); + String path = result.get("path").asText(); + String resultUrl = result.get("url").asText(); + if (type.equals("dir")) { + dirs.add(new URL(resultUrl)); + } else if (type.equals("file") && (path.endsWith(".yaml") || path.endsWith(".json"))) { + String downloadUrl = result.get("download_url").asText(); + examples.add(new Object[] { new URL(downloadUrl), result.get("name").asText() }); + } } + } + return examples; + } - @Parameter - public URL exampleUrl; + @Parameter + public URL exampleUrl; - @Parameter(1) - public String fileName; + @Parameter(1) + public String fileName; - @Test - public void serializeExample() throws Exception { - if (!exampleUrl.toString().contains("callback-example")) { - OpenApi3 model = (OpenApi3) new OpenApiParser().parse(exampleUrl); - JsonNode serialized = Overlay.toJson((OpenApi3Impl) model); - JsonNode expected = yamlMapper.readTree(exampleUrl); - JSONAssert.assertEquals(mapper.writeValueAsString(expected), mapper.writeValueAsString(serialized), - JSONCompareMode.STRICT); - } - } + @Test + public void serializeExample() throws Exception { + if (!exampleUrl.toString().contains("callback-example")) { + OpenApi3 model = (OpenApi3) new OpenApiParser().parse(exampleUrl); + JsonNode serialized = Overlay.toJson((OpenApi3Impl) model); + JsonNode expected = yamlMapper.readTree(exampleUrl); + JSONAssert.assertEquals(mapper.writeValueAsString(expected), mapper.writeValueAsString(serialized), + JSONCompareMode.STRICT); + } } + } - public static class NonParameterizedTests { - - @Test - public void toJsonNoticesChanges() throws Exception { - OpenApi3 model = parseLocalModel("simpleTest"); - assertEquals("simple model", model.getInfo().getTitle()); - assertEquals("simple model", Overlay.of(model).toJson().at("/info/title").asText()); - // this changes the overlay value but does not refresh cached JSON - just marks - // it as out-of-date - model.getInfo().setTitle("changed title"); - assertEquals("changed title", model.getInfo().getTitle()); - assertEquals("changed title", Overlay.of(model).toJson().at("/info/title").asText()); - } + public static class NonParameterizedTests { - @Test - public void toJsonFollowsRefs() throws Exception { - OpenApi3 model = parseLocalModel("simpleTest"); - Schema xSchema = model.getSchema("X"); - assertEquals("#/components/schemas/Y", Overlay.of(xSchema).toJson().at("/properties/y/$ref").asText()); - assertEquals("integer", Overlay.of(xSchema).toJson(Option.FOLLOW_REFS).at("/properties/y/type").asText()); - } + @Test + public void toJsonNoticesChanges() throws Exception { + OpenApi3 model = parseLocalModel("simpleTest"); + assertEquals("simple model", model.getInfo().getTitle()); + assertEquals("simple model", Overlay.of(model).toJson().at("/info/title").asText()); + // this changes the overlay value but does not refresh cached JSON - + // just marks + // it as out-of-date + model.getInfo().setTitle("changed title"); + assertEquals("changed title", model.getInfo().getTitle()); + assertEquals("changed title", Overlay.of(model).toJson().at("/info/title").asText()); } - private static OpenApi3 parseLocalModel(String name) throws Exception { - URL url = SimpleSerializationTest.class.getResource("/models/" + name + ".yaml"); - return (OpenApi3) new OpenApiParser().parse(url); + @Test + public void toJsonFollowsRefs() throws Exception { + OpenApi3 model = parseLocalModel("simpleTest"); + Schema xSchema = model.getSchema("X"); + assertEquals("#/components/schemas/Y", Overlay.of(xSchema).toJson().at("/properties/y/$ref").asText()); + assertEquals("integer", Overlay.of(xSchema).toJson(Option.FOLLOW_REFS).at("/properties/y/type").asText()); } + } - private static Iterable iterable(final Iterator iterator) { - return new Iterable() { - @Override - public Iterator iterator() { - return iterator; - } - }; - } + private static OpenApi3 parseLocalModel(String name) throws Exception { + URL url = SimpleSerializationTest.class.getResource("/models/" + name + ".yaml"); + return (OpenApi3) new OpenApiParser().parse(url); + } + + private static Iterable iterable(final Iterator iterator) { + return new Iterable() { + @Override + public Iterator iterator() { + return iterator; + } + }; + } }