Class OpenAPIContract
java.lang.Object
io.vertx.rxjava3.openapi.contract.OpenAPIContract
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenAPIContractBuilderInstantiates a new builder for an openapi-contract.booleanfindOperation(String urlPath, HttpMethod method) Finds the relatedOperationobject based on the passed url path and method.Finds the relatedPathobject based on the passed url path.static Single<OpenAPIContract> from(Vertx vertx, JsonObject contract) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static Single<OpenAPIContract> from(Vertx vertx, JsonObject contract, Map<String, JsonObject> additionalContractParts) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static Single<OpenAPIContract> Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static Single<OpenAPIContract> Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.getPaths()Returns the applicable list of global security requirements (scopes) or empty list.inthashCode()static OpenAPIContractAccess to an operation defined in the contract withoperationId.static Single<OpenAPIContract> rxFrom(Vertx vertx, JsonObject contract) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static Single<OpenAPIContract> rxFrom(Vertx vertx, JsonObject contract, Map<String, JsonObject> additionalContractParts) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static Single<OpenAPIContract> Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static Single<OpenAPIContract> Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.securityScheme(String name) Gets the relatedSecuritySchemeobject based on the passed name.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OpenAPIContract
-
OpenAPIContract
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
from
Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.- Parameters:
vertx- The related Vert.x instance.contractPath- The path to the contract.- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
rxFrom
Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.- Parameters:
vertx- The related Vert.x instance.contractPath- The path to the contract.- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
from
Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.- Parameters:
vertx- The related Vert.x instance.contract- The contract.- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
rxFrom
Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.- Parameters:
vertx- The related Vert.x instance.contract- The contract.- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
from
public static Single<OpenAPIContract> from(Vertx vertx, String contractPath, Map<String, String> additionalContractPartPaths) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.This method can be used in case that the contract is split into several parts. These parts can be passed in a Map that has the reference as key and the path to the part as value.
- Parameters:
vertx- The related Vert.x instance.contractPath- The path to the contract.additionalContractPartPaths- The additional contract part paths- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
rxFrom
public static Single<OpenAPIContract> rxFrom(Vertx vertx, String contractPath, Map<String, String> additionalContractPartPaths) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.This method can be used in case that the contract is split into several parts. These parts can be passed in a Map that has the reference as key and the path to the part as value.
- Parameters:
vertx- The related Vert.x instance.contractPath- The path to the contract.additionalContractPartPaths- The additional contract part paths- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
from
public static Single<OpenAPIContract> from(Vertx vertx, JsonObject contract, Map<String, JsonObject> additionalContractParts) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.This method can be used in case that the contract is split into several parts. These parts can be passed in a Map that has the reference as key and the part as value.
- Parameters:
vertx- The related Vert.x instance.contract- The unresolved contract.additionalContractParts- The additional contract parts- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
rxFrom
public static Single<OpenAPIContract> rxFrom(Vertx vertx, JsonObject contract, Map<String, JsonObject> additionalContractParts) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.This method can be used in case that the contract is split into several parts. These parts can be passed in a Map that has the reference as key and the part as value.
- Parameters:
vertx- The related Vert.x instance.contract- The unresolved contract.additionalContractParts- The additional contract parts- Returns:
- A succeeded holding an
OpenAPIContractinstance, otherwise a failed .
-
operation
-
operations
-
getPaths
-
getRawContract
- Returns:
- the resolved OpenAPI contract as .
-
getVersion
- Returns:
- the OpenAPI version of the contract.
-
getSchemaRepository
- Returns:
- the to validate against.
-
getServers
-
findPath
-
findOperation
Finds the relatedOperationobject based on the passed url path and method. -
getSecurityRequirements
Returns the applicable list of global security requirements (scopes) or empty list.- Returns:
- The related security requirement.
-
securityScheme
Gets the relatedSecuritySchemeobject based on the passed name.- Parameters:
name- The name of the security scheme.- Returns:
- the found
SecuritySchemeobject, or null if the passed path and method doesn't match anyOperationobject.
-
builder
Instantiates a new builder for an openapi-contract.- Parameters:
vertx- The vert.x instance- Returns:
- A new builder.
-
newInstance
-