Class OpenAPIContract
- All Implemented Interfaces:
MutinyDelegate
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOpenAPIContract(io.vertx.openapi.contract.OpenAPIContract delegate) OpenAPIContract(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfindOperation(String urlPath, io.vertx.core.http.HttpMethod method) static io.smallrye.mutiny.Uni<OpenAPIContract>Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.smallrye.mutiny.Uni<OpenAPIContract>from(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract, Map<String, io.vertx.core.json.JsonObject> additionalContractFiles) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.smallrye.mutiny.Uni<OpenAPIContract>Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static io.smallrye.mutiny.Uni<OpenAPIContract>Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.static OpenAPIContractfromAndAwait(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract) Blocking variant offrom(io.vertx.mutiny.core.Vertx,JsonObject).static OpenAPIContractfromAndAwait(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract, Map<String, io.vertx.core.json.JsonObject> additionalContractFiles) Blocking variant offrom(io.vertx.mutiny.core.Vertx,JsonObject,Map).static OpenAPIContractfromAndAwait(Vertx vertx, String unresolvedContractPath) Blocking variant offrom(io.vertx.mutiny.core.Vertx,String).static OpenAPIContractfromAndAwait(Vertx vertx, String unresolvedContractPath, Map<String, String> additionalContractFiles) Blocking variant offrom(io.vertx.mutiny.core.Vertx,String,Map).static voidfromAndForget(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract) Variant offrom(io.vertx.mutiny.core.Vertx,JsonObject)that ignores the result of the operation.static voidfromAndForget(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract, Map<String, io.vertx.core.json.JsonObject> additionalContractFiles) Variant offrom(io.vertx.mutiny.core.Vertx,JsonObject,Map)that ignores the result of the operation.static voidfromAndForget(Vertx vertx, String unresolvedContractPath) Variant offrom(io.vertx.mutiny.core.Vertx,String)that ignores the result of the operation.static voidfromAndForget(Vertx vertx, String unresolvedContractPath, Map<String, String> additionalContractFiles) Variant offrom(io.vertx.mutiny.core.Vertx,String,Map)that ignores the result of the operation.io.vertx.openapi.contract.OpenAPIContractgetPaths()io.vertx.core.json.JsonObjectio.vertx.openapi.contract.OpenAPIVersioninthashCode()static OpenAPIContractnewInstance(io.vertx.openapi.contract.OpenAPIContract arg) securityScheme(String name) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
OpenAPIContract
public OpenAPIContract(io.vertx.openapi.contract.OpenAPIContract delegate) -
OpenAPIContract
-
-
Method Details
-
getDelegate
public io.vertx.openapi.contract.OpenAPIContract getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
from
@CheckReturnValue public static io.smallrye.mutiny.Uni<OpenAPIContract> from(Vertx vertx, String unresolvedContractPath) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
vertx- The related Vert.x instance.unresolvedContractPath- The path to the unresolved contract.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
fromAndAwait
Blocking variant offrom(io.vertx.mutiny.core.Vertx,String).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
vertx- The related Vert.x instance.unresolvedContractPath- The path to the unresolved contract.- Returns:
- the OpenAPIContract instance produced by the operation.
-
fromAndForget
Variant offrom(io.vertx.mutiny.core.Vertx,String)that ignores the result of the operation.This method subscribes on the result of
from(io.vertx.mutiny.core.Vertx,String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromfrom(io.vertx.mutiny.core.Vertx,String)but you don't need to compose it with other operations.- Parameters:
vertx- The related Vert.x instance.unresolvedContractPath- The path to the unresolved contract.
-
from
@CheckReturnValue public static io.smallrye.mutiny.Uni<OpenAPIContract> from(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
vertx- The related Vert.x instance.unresolvedContract- The unresolved contract.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
fromAndAwait
public static OpenAPIContract fromAndAwait(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract) Blocking variant offrom(io.vertx.mutiny.core.Vertx,JsonObject).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
vertx- The related Vert.x instance.unresolvedContract- The unresolved contract.- Returns:
- the OpenAPIContract instance produced by the operation.
-
fromAndForget
Variant offrom(io.vertx.mutiny.core.Vertx,JsonObject)that ignores the result of the operation.This method subscribes on the result of
from(io.vertx.mutiny.core.Vertx,JsonObject), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromfrom(io.vertx.mutiny.core.Vertx,JsonObject)but you don't need to compose it with other operations.- Parameters:
vertx- The related Vert.x instance.unresolvedContract- The unresolved contract.
-
from
@CheckReturnValue public static io.smallrye.mutiny.Uni<OpenAPIContract> from(Vertx vertx, String unresolvedContractPath, Map<String, String> additionalContractFiles) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.This method can be used in case that the contract is split into several files. These files can be passed in a Map that has the reference as key and the path to the file as value.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
vertx- The related Vert.x instance.unresolvedContractPath- The path to the unresolved contract.additionalContractFiles- The additional contract files- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
fromAndAwait
public static OpenAPIContract fromAndAwait(Vertx vertx, String unresolvedContractPath, Map<String, String> additionalContractFiles) Blocking variant offrom(io.vertx.mutiny.core.Vertx,String,Map).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
vertx- The related Vert.x instance.unresolvedContractPath- The path to the unresolved contract.additionalContractFiles- The additional contract files- Returns:
- the OpenAPIContract instance produced by the operation.
-
fromAndForget
public static void fromAndForget(Vertx vertx, String unresolvedContractPath, Map<String, String> additionalContractFiles) Variant offrom(io.vertx.mutiny.core.Vertx,String,Map)that ignores the result of the operation.This method subscribes on the result of
from(io.vertx.mutiny.core.Vertx,String,Map), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromfrom(io.vertx.mutiny.core.Vertx,String,Map)but you don't need to compose it with other operations.- Parameters:
vertx- The related Vert.x instance.unresolvedContractPath- The path to the unresolved contract.additionalContractFiles- The additional contract files
-
from
@CheckReturnValue public static io.smallrye.mutiny.Uni<OpenAPIContract> from(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract, Map<String, io.vertx.core.json.JsonObject> additionalContractFiles) Resolves / dereferences the passed contract and creates anOpenAPIContractinstance.This method can be used in case that the contract is split into several files. These files can be passed in a Map that has the reference as key and the path to the file as value.
Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
vertx- The related Vert.x instance.unresolvedContract- The unresolved contract.additionalContractFiles- The additional contract files- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
fromAndAwait
public static OpenAPIContract fromAndAwait(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract, Map<String, io.vertx.core.json.JsonObject> additionalContractFiles) Blocking variant offrom(io.vertx.mutiny.core.Vertx,JsonObject,Map).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
vertx- The related Vert.x instance.unresolvedContract- The unresolved contract.additionalContractFiles- The additional contract files- Returns:
- the OpenAPIContract instance produced by the operation.
-
fromAndForget
public static void fromAndForget(Vertx vertx, io.vertx.core.json.JsonObject unresolvedContract, Map<String, io.vertx.core.json.JsonObject> additionalContractFiles) Variant offrom(io.vertx.mutiny.core.Vertx,JsonObject,Map)that ignores the result of the operation.This method subscribes on the result of
from(io.vertx.mutiny.core.Vertx,JsonObject,Map), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromfrom(io.vertx.mutiny.core.Vertx,JsonObject,Map)but you don't need to compose it with other operations.- Parameters:
vertx- The related Vert.x instance.unresolvedContract- The unresolved contract.additionalContractFiles- The additional contract files
-
operation
- 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
public io.vertx.core.json.JsonObject getRawContract()- Returns:
- the resolved OpenAPI contract as .
-
getVersion
public io.vertx.openapi.contract.OpenAPIVersion getVersion()- Returns:
- the OpenAPI version of the contract.
-
getSchemaRepository
- Returns:
- the to validate against.
-
getServers
- Returns:
- the servers of the contract.
-
findPath
-
findOperation
-
getSecurityRequirements
- Returns:
- The related security requirement.
-
securityScheme
- Parameters:
name- The name of the security scheme.- Returns:
- the found
SecuritySchemeobject, or null if the passed path and method doesn't match anyOperationobject.
-
newInstance
-