Class Smithy2OpenApi
- java.lang.Object
-
- software.amazon.smithy.openapi.fromsmithy.Smithy2OpenApi
-
- All Implemented Interfaces:
SmithyBuildPlugin
public final class Smithy2OpenApi extends java.lang.Object implements SmithyBuildPlugin
Converts Smithy to an OpenAPI model and saves it as a JSON file.This plugin requires a setting named "service" that is the Shape ID of the Smithy service shape to convert to OpenAPI.
This plugin is configured using
OpenApiConfig.
-
-
Constructor Summary
Constructors Constructor Description Smithy2OpenApi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(PluginContext context)Executes the plugin, creating any number of artifacts.java.lang.StringgetName()Gets the name of the plugin.-
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.build.SmithyBuildPlugin
isSerial, requiresValidModel
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:SmithyBuildPluginGets the name of the plugin.- Specified by:
getNamein interfaceSmithyBuildPlugin- Returns:
- Returns the name (e.g., "MyPlugin").
-
execute
public void execute(PluginContext context)
Description copied from interface:SmithyBuildPluginExecutes the plugin, creating any number of artifacts.- Specified by:
executein interfaceSmithyBuildPlugin- Parameters:
context- Plugin context for build execution.
-
-