Class OpenAPIContract
java.lang.Object
io.vertx.rxjava3.openapi.contract.OpenAPIContract
- All Implemented Interfaces:
RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenAPIContractBuilderbuilder(io.vertx.rxjava3.core.Vertx vertx) Instantiates 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 io.reactivex.rxjava3.core.Single<OpenAPIContract>from(io.vertx.rxjava3.core.Vertx vertx, JsonObject contract) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.reactivex.rxjava3.core.Single<OpenAPIContract>from(io.vertx.rxjava3.core.Vertx vertx, JsonObject contract, Map<String, JsonObject> additionalContractParts) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.reactivex.rxjava3.core.Single<OpenAPIContract>Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.reactivex.rxjava3.core.Single<OpenAPIContract>from(io.vertx.rxjava3.core.Vertx vertx, String contractPath, Map<String, String> additionalContractPartPaths) 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 io.reactivex.rxjava3.core.Single<OpenAPIContract>rxFrom(io.vertx.rxjava3.core.Vertx vertx, JsonObject contract) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.reactivex.rxjava3.core.Single<OpenAPIContract>rxFrom(io.vertx.rxjava3.core.Vertx vertx, JsonObject contract, Map<String, JsonObject> additionalContractParts) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.reactivex.rxjava3.core.Single<OpenAPIContract>Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.reactivex.rxjava3.core.Single<OpenAPIContract>rxFrom(io.vertx.rxjava3.core.Vertx vertx, String contractPath, Map<String, String> additionalContractPartPaths) 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
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
from
public static io.reactivex.rxjava3.core.Single<OpenAPIContract> from(io.vertx.rxjava3.core.Vertx vertx, String contractPath) 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
public static io.reactivex.rxjava3.core.Single<OpenAPIContract> rxFrom(io.vertx.rxjava3.core.Vertx vertx, String contractPath) 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
public static io.reactivex.rxjava3.core.Single<OpenAPIContract> from(io.vertx.rxjava3.core.Vertx vertx, JsonObject contract) 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
public static io.reactivex.rxjava3.core.Single<OpenAPIContract> rxFrom(io.vertx.rxjava3.core.Vertx vertx, JsonObject contract) 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 io.reactivex.rxjava3.core.Single<OpenAPIContract> from(io.vertx.rxjava3.core.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 io.reactivex.rxjava3.core.Single<OpenAPIContract> rxFrom(io.vertx.rxjava3.core.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 io.reactivex.rxjava3.core.Single<OpenAPIContract> from(io.vertx.rxjava3.core.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 io.reactivex.rxjava3.core.Single<OpenAPIContract> rxFrom(io.vertx.rxjava3.core.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
Access to an operation defined in the contract withoperationId.- Parameters:
operationId- the id of the operation.- Returns:
- the requested operation.
-
operations
- Returns:
- all operations defined in the contract.
-
getPaths
- Returns:
- all
Pathsdefined in the OpenAPI contract.
-
getRawContract
- Returns:
- the resolved OpenAPI contract as .
-
getVersion
- Returns:
- the OpenAPI version of the contract.
-
getSchemaRepository
- Returns:
- the to validate against.
-
getServers
- Returns:
- the servers of the contract.
-
findPath
Finds the relatedPathobject based on the passed url path. -
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
-