@CompileStatic class ComponentSchemas extends java.lang.Object
The schemas a document holds in its components: resolved from classes through swagger-core, derived from them, such as a patch, and named so that no two share a name.
| Type | Name and description |
|---|---|
static java.lang.String |
REFERENCE_PREFIX |
| Constructor and description |
|---|
ComponentSchemas(io.swagger.v3.oas.models.Components components, boolean openapi31) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addedBy(Closure<?> work)Counts the schemas some work adds to the components as this document's own, as swagger-core adds a class an annotation names as it reads the annotation, so such a class is named apart as one resolved here is. |
|
SchemaNames |
getNames()The names the classes described are given while the document is described. |
|
io.swagger.v3.oas.models.media.Schema<?> |
inline(java.lang.Class<?> type)The schema of a type described inline, to read its properties from rather than to add to the document, so it claims no name in it. |
|
static java.lang.String |
nameOf(io.swagger.v3.oas.models.media.Schema<?> reference)
|
|
io.swagger.v3.oas.models.media.Schema<?> |
patchReference(io.swagger.v3.oas.models.media.Schema<?> reference)The schema of a patch of what a reference refers to: its properties with nothing required, since a patch binds only what it is sent, sent in XML as the same element. |
|
io.swagger.v3.oas.models.media.Schema<?> |
reference(java.lang.Class<?> type)Resolves a type into the components through swagger-core and refers to it. |
|
static io.swagger.v3.oas.models.media.Schema<?> |
referenceTo(java.lang.String name) |
|
java.util.Map<java.lang.String, java.lang.String> |
renames()The names to move the schemas this document added to, now that every class described is known: a class holding a name another class also claims moves to its qualified name, and a patch schema follows the schema it is a patch of. |
|
java.lang.String |
reserve(java.lang.String name)Keeps a name for a schema that is not resolved from a class, so no class takes it. |
|
void |
reserve(java.lang.String name, java.lang.Class<?> resolvedFrom)Keeps a name the document already has, for the class springdoc resolved its schema from where that is known, so the class is described under the name, as Grails renders it, rather than apart from it. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Counts the schemas some work adds to the components as this document's own, as swagger-core adds a class an annotation names as it reads the annotation, so such a class is named apart as one resolved here is.
The names the classes described are given while the document is described.
The schema of a type described inline, to read its properties from rather than to add to the document, so it claims no name in it.
nullThe schema of a patch of what a reference refers to: its properties with nothing required, since a patch binds only what it is sent, sent in XML as the same element. A schema requiring nothing is its own patch.
Resolves a type into the components through swagger-core and refers to it.
null where the type cannot be describedThe names to move the schemas this document added to, now that every class described is known: a class holding a name another class also claims moves to its qualified name, and a patch schema follows the schema it is a patch of. A schema the document already had keeps its name.
Keeps a name for a schema that is not resolved from a class, so no class takes it.
Keeps a name the document already has, for the class springdoc resolved its schema from where that is known, so the class is described under the name, as Grails renders it, rather than apart from it.