Package io.smallrye.openapi.model
Enum ReferenceType
- All Implemented Interfaces:
Serializable,Comparable<ReferenceType>
Simple enum to indicate the type of a $ref being read/written.
- Author:
- eric.wittmann@gmail.com
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ReferenceTypefromComponentPath(String path) static ReferenceTypefromModel(org.eclipse.microprofile.openapi.models.Reference<?> model) static booleanisReference(org.jboss.jandex.AnnotationInstance annotation) parseRefValue(String ref) Takes the value from a ref property from an annotation, and converts it to a JSON Pointer, suitable for use as a reference in an OpenAPI model.referenceOf(String ref) static StringreferenceValue(org.jboss.jandex.AnnotationInstance annotation) refValue(org.jboss.jandex.AnnotationInstance annotation) Reads a string property named "ref" value from the given annotation and converts it to a value appropriate for setting on a model's "$ref" property.static ReferenceTypeReturns the enum constant of this type with the specified name.static ReferenceType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HEADER
-
SCHEMA
-
SECURITY_SCHEME
-
CALLBACK
-
LINK
-
RESPONSE
-
PARAMETER
-
EXAMPLE
-
REQUEST_BODY
-
PATH_ITEM
-
-
Field Details
-
PROP_ANNOTATION
- See Also:
-
PROP_STANDARD
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromModel
-
fromComponentPath
-
isReference
public static boolean isReference(org.jboss.jandex.AnnotationInstance annotation) -
referenceValue
-
referencePrefix
-
referenceOf
-
parseRefValue
Takes the value from a ref property from an annotation, and converts it to a JSON Pointer, suitable for use as a reference in an OpenAPI model.- Parameters:
ref- the ref value read from an annotation- Returns:
- a value suitable for use in an OpenAPI model.
-
refValue
Reads a string property named "ref" value from the given annotation and converts it to a value appropriate for setting on a model's "$ref" property.- Parameters:
annotation- AnnotationInstance- Returns:
- String value
-