com.networknt.oas.model.OpenApi3 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openapi-parser Show documentation
Show all versions of openapi-parser Show documentation
A light-weight, fast OpenAPI 3.0 parser and validator
/*******************************************************************************
* Copyright (c) 2017 ModelSolv, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* ModelSolv, Inc. - initial API and implementation and/or initial documentation
*******************************************************************************/
package com.networknt.oas.model;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.networknt.jsonoverlay.IJsonOverlay;
import com.networknt.jsonoverlay.IModelPart;
import com.networknt.oas.OpenApi;
import com.networknt.oas.validator.ValidationResults;
public interface OpenApi3 extends IJsonOverlay, IModelPart, OpenApi {
public void validate();
public boolean isValid();
public ValidationResults getValidationResults();
public Collection getValidationItems();
// OpenApi
String getOpenApi();
void setOpenApi(String openApi);
// Info
Info getInfo();
Info getInfo(boolean elaborate);
void setInfo(Info info);
// Server
List getServers();
List getServers(boolean elaborate);
boolean hasServers();
Server getServer(int index);
void setServers(List servers);
void setServer(int index, Server server);
void addServer(Server server);
void insertServer(int index, Server server);
void removeServer(int index);
// Path
Map getPaths();
Map getPaths(boolean elaborate);
boolean hasPaths();
boolean hasPath(String name);
Path getPath(String name);
void setPaths(Map paths);
void setPath(String name, Path path);
void removePath(String name);
// PathsExtension
Map getPathsExtensions();
Map getPathsExtensions(boolean elaborate);
boolean hasPathsExtensions();
boolean hasPathsExtension(String name);
Object getPathsExtension(String name);
void setPathsExtensions(Map pathsExtensions);
void setPathsExtension(String name, Object pathsExtension);
void removePathsExtension(String name);
// Schema
Map getSchemas();
Map getSchemas(boolean elaborate);
boolean hasSchemas();
boolean hasSchema(String name);
Schema getSchema(String name);
void setSchemas(Map schemas);
void setSchema(String name, Schema schema);
void removeSchema(String name);
// Response
Map getResponses();
Map getResponses(boolean elaborate);
boolean hasResponses();
boolean hasResponse(String name);
Response getResponse(String name);
void setResponses(Map responses);
void setResponse(String name, Response response);
void removeResponse(String name);
// Parameter
Map getParameters();
Map getParameters(boolean elaborate);
boolean hasParameters();
boolean hasParameter(String name);
Parameter getParameter(String name);
void setParameters(Map parameters);
void setParameter(String name, Parameter parameter);
void removeParameter(String name);
// Example
Map getExamples();
Map getExamples(boolean elaborate);
boolean hasExamples();
boolean hasExample(String name);
Example getExample(String name);
void setExamples(Map examples);
void setExample(String name, Example example);
void removeExample(String name);
// RequestBody
Map getRequestBodies();
Map getRequestBodies(boolean elaborate);
boolean hasRequestBodies();
boolean hasRequestBody(String name);
RequestBody getRequestBody(String name);
void setRequestBodies(Map requestBodies);
void setRequestBody(String name, RequestBody requestBody);
void removeRequestBody(String name);
// Header
Map getHeaders();
Map getHeaders(boolean elaborate);
boolean hasHeaders();
boolean hasHeader(String name);
Header getHeader(String name);
void setHeaders(Map headers);
void setHeader(String name, Header header);
void removeHeader(String name);
// SecurityScheme
Map getSecuritySchemes();
Map getSecuritySchemes(boolean elaborate);
boolean hasSecuritySchemes();
boolean hasSecurityScheme(String name);
SecurityScheme getSecurityScheme(String name);
void setSecuritySchemes(Map securitySchemes);
void setSecurityScheme(String name, SecurityScheme securityScheme);
void removeSecurityScheme(String name);
// Link
Map getLinks();
Map getLinks(boolean elaborate);
boolean hasLinks();
boolean hasLink(String name);
Link getLink(String name);
void setLinks(Map links);
void setLink(String name, Link link);
void removeLink(String name);
// Callback
Map getCallbacks();
Map getCallbacks(boolean elaborate);
boolean hasCallbacks();
boolean hasCallback(String name);
Callback getCallback(String name);
void setCallbacks(Map callbacks);
void setCallback(String name, Callback callback);
void removeCallback(String name);
// ComponentsExtension
Map getComponentsExtensions();
Map getComponentsExtensions(boolean elaborate);
boolean hasComponentsExtensions();
boolean hasComponentsExtension(String name);
Object getComponentsExtension(String name);
void setComponentsExtensions(Map componentsExtensions);
void setComponentsExtension(String name, Object componentsExtension);
void removeComponentsExtension(String name);
// SecurityRequirement
List getSecurityRequirements();
List getSecurityRequirements(boolean elaborate);
boolean hasSecurityRequirements();
SecurityRequirement getSecurityRequirement(int index);
void setSecurityRequirements(List securityRequirements);
void setSecurityRequirement(int index, SecurityRequirement securityRequirement);
void addSecurityRequirement(SecurityRequirement securityRequirement);
void insertSecurityRequirement(int index, SecurityRequirement securityRequirement);
void removeSecurityRequirement(int index);
// Tag
List getTags();
List getTags(boolean elaborate);
boolean hasTags();
Tag getTag(int index);
void setTags(List tags);
void setTag(int index, Tag tag);
void addTag(Tag tag);
void insertTag(int index, Tag tag);
void removeTag(int index);
// ExternalDocs
ExternalDocs getExternalDocs();
ExternalDocs getExternalDocs(boolean elaborate);
void setExternalDocs(ExternalDocs externalDocs);
// Extension
Map getExtensions();
Map getExtensions(boolean elaborate);
boolean hasExtensions();
boolean hasExtension(String name);
Object getExtension(String name);
void setExtensions(Map extensions);
void setExtension(String name, Object extension);
void removeExtension(String name);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy