public class OpenAPIContract extends Object
Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<OpenAPIContract> |
__TYPE_ARG |
Constructor and Description |
---|
OpenAPIContract(Object delegate) |
OpenAPIContract(OpenAPIContract delegate) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Operation |
findOperation(String urlPath,
HttpMethod method)
Finds the related
Operation object based on the passed url path and method. |
Path |
findPath(String urlPath)
Finds the related
Path object based on the passed url path. |
static Future<OpenAPIContract> |
from(Vertx vertx,
JsonObject unresolvedContract)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
static Future<OpenAPIContract> |
from(Vertx vertx,
JsonObject unresolvedContract,
Map<String,JsonObject> additionalContractFiles)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
static Future<OpenAPIContract> |
from(Vertx vertx,
String unresolvedContractPath)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
static Future<OpenAPIContract> |
from(Vertx vertx,
String unresolvedContractPath,
Map<String,String> additionalContractFiles)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
OpenAPIContract |
getDelegate() |
List<Path> |
getPaths() |
JsonObject |
getRawContract() |
SchemaRepository |
getSchemaRepository() |
List<SecurityRequirement> |
getSecurityRequirements()
Returns the applicable list of global security requirements (scopes) or empty list.
|
List<Server> |
getServers() |
OpenAPIVersion |
getVersion() |
int |
hashCode() |
static OpenAPIContract |
newInstance(OpenAPIContract arg) |
Operation |
operation(String operationId)
Access to an operation defined in the contract with
operationId . |
List<Operation> |
operations() |
static Single<OpenAPIContract> |
rxFrom(Vertx vertx,
JsonObject unresolvedContract)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
static Single<OpenAPIContract> |
rxFrom(Vertx vertx,
JsonObject unresolvedContract,
Map<String,JsonObject> additionalContractFiles)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
static Single<OpenAPIContract> |
rxFrom(Vertx vertx,
String unresolvedContractPath)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
static Single<OpenAPIContract> |
rxFrom(Vertx vertx,
String unresolvedContractPath,
Map<String,String> additionalContractFiles)
Resolves / dereferences the passed contract and creates an
OpenAPIContract instance. |
SecurityScheme |
securityScheme(String name)
Gets the related
SecurityScheme object based on the passed name. |
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<OpenAPIContract> __TYPE_ARG
public OpenAPIContract(OpenAPIContract delegate)
public OpenAPIContract(Object delegate)
public OpenAPIContract getDelegate()
public static Future<OpenAPIContract> from(Vertx vertx, String unresolvedContractPath)
OpenAPIContract
instance.vertx
- The related Vert.x instance.unresolvedContractPath
- The path to the unresolved contract.OpenAPIContract
instance, otherwise a failed .public static Single<OpenAPIContract> rxFrom(Vertx vertx, String unresolvedContractPath)
OpenAPIContract
instance.vertx
- The related Vert.x instance.unresolvedContractPath
- The path to the unresolved contract.OpenAPIContract
instance, otherwise a failed .public static Future<OpenAPIContract> from(Vertx vertx, JsonObject unresolvedContract)
OpenAPIContract
instance.vertx
- The related Vert.x instance.unresolvedContract
- The unresolved contract.OpenAPIContract
instance, otherwise a failed .public static Single<OpenAPIContract> rxFrom(Vertx vertx, JsonObject unresolvedContract)
OpenAPIContract
instance.vertx
- The related Vert.x instance.unresolvedContract
- The unresolved contract.OpenAPIContract
instance, otherwise a failed .public static Future<OpenAPIContract> from(Vertx vertx, String unresolvedContractPath, Map<String,String> additionalContractFiles)
OpenAPIContract
instance.
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.
vertx
- The related Vert.x instance.unresolvedContractPath
- The path to the unresolved contract.additionalContractFiles
- The additional contract filesOpenAPIContract
instance, otherwise a failed .public static Single<OpenAPIContract> rxFrom(Vertx vertx, String unresolvedContractPath, Map<String,String> additionalContractFiles)
OpenAPIContract
instance.
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.
vertx
- The related Vert.x instance.unresolvedContractPath
- The path to the unresolved contract.additionalContractFiles
- The additional contract filesOpenAPIContract
instance, otherwise a failed .public static Future<OpenAPIContract> from(Vertx vertx, JsonObject unresolvedContract, Map<String,JsonObject> additionalContractFiles)
OpenAPIContract
instance.
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.
vertx
- The related Vert.x instance.unresolvedContract
- The unresolved contract.additionalContractFiles
- The additional contract filesOpenAPIContract
instance, otherwise a failed .public static Single<OpenAPIContract> rxFrom(Vertx vertx, JsonObject unresolvedContract, Map<String,JsonObject> additionalContractFiles)
OpenAPIContract
instance.
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.
vertx
- The related Vert.x instance.unresolvedContract
- The unresolved contract.additionalContractFiles
- The additional contract filesOpenAPIContract
instance, otherwise a failed .public Operation operation(String operationId)
operationId
.operationId
- the id of the operation.public JsonObject getRawContract()
public OpenAPIVersion getVersion()
public SchemaRepository getSchemaRepository()
public Path findPath(String urlPath)
Path
object based on the passed url path.public Operation findOperation(String urlPath, HttpMethod method)
Operation
object based on the passed url path and method.public List<SecurityRequirement> getSecurityRequirements()
public SecurityScheme securityScheme(String name)
SecurityScheme
object based on the passed name.name
- The name of the security scheme.SecurityScheme
object, or null if the passed path and method doesn't match any Operation
object.public static OpenAPIContract newInstance(OpenAPIContract arg)
Copyright © 2024 Eclipse. All rights reserved.