public interface OpenAPIContract
Modifier and Type | Method and Description |
---|---|
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. |
List<Path> |
getPaths() |
JsonObject |
getRawContract() |
SchemaRepository |
getSchemaRepository() |
List<Server> |
getServers() |
OpenAPIVersion |
getVersion() |
Operation |
operation(String operationId)
Access to an operation defined in the contract with
operationId . |
List<Operation> |
operations() |
static Future<OpenAPIContract> from(Vertx vertx, String unresolvedContractPath)
OpenAPIContract
instance.vertx
- The related Vert.x instance.unresolvedContractPath
- The path to the unresolved contract.Future
holding an OpenAPIContract
instance, otherwise a failed Future
.static Future<OpenAPIContract> from(Vertx vertx, JsonObject unresolvedContract)
OpenAPIContract
instance.vertx
- The related Vert.x instance.unresolvedContract
- The unresolved contract.Future
holding an OpenAPIContract
instance, otherwise a failed Future
.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 filesFuture
holding an OpenAPIContract
instance, otherwise a failed Future
.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 filesFuture
holding an OpenAPIContract
instance, otherwise a failed Future
.Operation operation(String operationId)
operationId
.operationId
- the id of the operation.IllegalArgumentException
- if the operation id doesn't exist in the contract.JsonObject getRawContract()
JsonObject
.OpenAPIVersion getVersion()
SchemaRepository getSchemaRepository()
SchemaRepository
to validate against.Operation findOperation(String urlPath, HttpMethod method)
Operation
object based on the passed url path and method.Copyright © 2023 Eclipse. All rights reserved.