Package org.forgerock.api.transform
Class OpenApiHelper
java.lang.Object
org.forgerock.api.transform.OpenApiHelper
Helper methods for applying commonly needed changes to the
Swagger
model.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Visits a SwaggerOperation
. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addHeaderToAllOperations
(io.swagger.models.parameters.HeaderParameter header, io.swagger.models.Swagger swagger) Adds a header to all operations.static void
visitAllOperations
(OpenApiHelper.OperationVisitor visitor, io.swagger.models.Swagger swagger) Visits all operations.
-
Method Details
-
addHeaderToAllOperations
public static void addHeaderToAllOperations(io.swagger.models.parameters.HeaderParameter header, io.swagger.models.Swagger swagger) Adds a header to all operations. For example, one may need to add authentication headers for username and password.- Parameters:
header
- Header modelswagger
- Swagger model
-
visitAllOperations
public static void visitAllOperations(OpenApiHelper.OperationVisitor visitor, io.swagger.models.Swagger swagger) Visits all operations.- Parameters:
visitor
- Operation visitorswagger
- Swagger model
-