Package org.forgerock.api.transform
Class OpenApiTransformer
java.lang.Object
org.forgerock.api.transform.OpenApiTransformer
Transforms an
ApiDescription
into an OpenAPI/Swagger model.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.swagger.models.Swagger
execute
(ApiDescription apiDescription, ApiDescription... externalApiDescriptions) Transforms anApiDescription
into aSwagger
model.static io.swagger.models.Swagger
execute
(LocalizableString title, String host, String basePath, boolean secure, ApiDescription apiDescription, ApiDescription... externalApiDescriptions) Transforms anApiDescription
into aSwagger
model.
-
Method Details
-
execute
public static io.swagger.models.Swagger execute(LocalizableString title, String host, String basePath, boolean secure, ApiDescription apiDescription, ApiDescription... externalApiDescriptions) Transforms anApiDescription
into aSwagger
model.- Parameters:
title
- API titlehost
- Hostname or IP address, with optional portbasePath
- Base-path on hostsecure
-true
when host is using HTTPS andfalse
when using HTTPapiDescription
- CREST API DescriptorexternalApiDescriptions
- External CREST API Descriptions, for resolvingReference
s, ornull
- Returns:
Swagger
model
-
execute
public static io.swagger.models.Swagger execute(ApiDescription apiDescription, ApiDescription... externalApiDescriptions) Transforms anApiDescription
into aSwagger
model.Note: The returned descriptor does not contain an
Info
object, a base path, a host or a scheme, as these will all depend on the deployment and/or request.- Parameters:
apiDescription
- CREST API DescriptorexternalApiDescriptions
- External CREST API Descriptions, for resolvingReference
s, ornull
- Returns:
Swagger
model
-