Class Component
- java.lang.Object
-
- software.amazon.smithy.openapi.model.Component
-
- All Implemented Interfaces:
ToNode
- Direct Known Subclasses:
CallbackObject
,ComponentsObject
,EncodingObject
,ExampleObject
,ExternalDocumentation
,InfoObject
,LinkObject
,MediaTypeObject
,OpenApi
,OperationObject
,ParameterObject
,PathItem
,RequestBodyObject
,ResponseObject
,SecurityScheme
,ServerObject
,TagObject
,XmlObject
public abstract class Component extends java.lang.Object implements ToNode
Abstract class used for most OpenAPI model components.This class provides the ability to add arbitrary key-value pairs to just about everything in the model. You'll need to ensure that "x-" is added to each key to ensure compliance. "x-" can be omitted if adding something that's built-in to the OpenAPI spec but not directly supported in this package (for example, "discriminator", "examples", etc).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Component.Builder<B extends Component.Builder,C extends Component>
-
Constructor Summary
Constructors Modifier Constructor Description protected
Component(Component.Builder<?,?> builder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ObjectNode.Builder
createNodeBuilder()
boolean
equals(java.lang.Object o)
java.util.Optional<Node>
getExtension(java.lang.String name)
java.util.Map<java.lang.String,Node>
getExtensions()
int
hashCode()
Node
toNode()
Converts a value to aNode
.
-
-
-
Constructor Detail
-
Component
protected Component(Component.Builder<?,?> builder)
-
-
Method Detail
-
getExtension
public final java.util.Optional<Node> getExtension(java.lang.String name)
-
getExtensions
public final java.util.Map<java.lang.String,Node> getExtensions()
-
toNode
public final Node toNode()
Description copied from interface:ToNode
Converts a value to aNode
.
-
createNodeBuilder
protected abstract ObjectNode.Builder createNodeBuilder()
-
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-