Package org.forgerock.api.transform
Class OpenApiHelper
- java.lang.Object
-
- org.forgerock.api.transform.OpenApiHelper
-
public final class OpenApiHelper extends Object
Helper methods for applying commonly needed changes to theSwagger
model.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
OpenApiHelper.OperationVisitor
Visits a SwaggerOperation
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
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
-
-