Class OpenApiJsonAdd
- java.lang.Object
-
- software.amazon.smithy.openapi.fromsmithy.mappers.OpenApiJsonAdd
-
- All Implemented Interfaces:
OpenApiMapper
public final class OpenApiJsonAdd extends java.lang.Object implements OpenApiMapper
Adds JSON values into the generated OpenAPI model using a JSON Patch like "add" operation that also generated intermediate objects as needed. Any existing property is overwritten.This mapper is applied using the contents of
openapi.jsonAdd
. This is run after substitutions so it is unaffected by them.
-
-
Constructor Summary
Constructors Constructor Description OpenApiJsonAdd()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getOrder()
Gets the sort order of the plugin from -128 to 127.ObjectNode
updateNode(Context<? extends Trait> context, OpenApi openapi, ObjectNode node)
Modifies the Node/JSON representation of an OpenAPI object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.openapi.fromsmithy.OpenApiMapper
after, before, postProcessOperation, updateDefaultSettings, updateOperation, updateParameter, updatePathItem, updateRequestBody, updateResponse, updateSecurity, updateSecurityScheme
-
-
-
-
Method Detail
-
getOrder
public byte getOrder()
Description copied from interface:OpenApiMapper
Gets the sort order of the plugin from -128 to 127.Plugins are applied according to this sort order. Lower values are executed before higher values (for example, -128 comes before 0, comes before 127). Plugins default to 0, which is the middle point between the minimum and maximum order values.
- Specified by:
getOrder
in interfaceOpenApiMapper
- Returns:
- Returns the sort order, defaulting to 0.
-
updateNode
public ObjectNode updateNode(Context<? extends Trait> context, OpenApi openapi, ObjectNode node)
Description copied from interface:OpenApiMapper
Modifies the Node/JSON representation of an OpenAPI object.- Specified by:
updateNode
in interfaceOpenApiMapper
- Parameters:
context
- Conversion context.openapi
- OpenAPI object being converted to a node.node
- OpenAPI object node.- Returns:
- Returns the updated ObjectNode.
-
-