JsonSchemasEndpoint class
The jsonschemas endpoint: the JSON Schemas of the application.
registry: the schemas of the context'sJsonSchemaRegistry(those ofspring.json.schemas, of@JsonSchemaSource, ofJsonSchemabeans and of the app's own customizers), by the location or$ideach is known by;introspected: the schema of every@Introspectedclass of the application, made from its introspection with theObjectMapper's naming (JsonSchemaGenerator): what its JSON looks like.
GET /actuator/jsonschemas/{name} gives one: a class name, else a
location (/actuator/jsonschemas/resources:schemas/order.json);
nothing (404) when there is none. Like every endpoint but health, it
answers over HTTP once exposed:
management.endpoints.web.exposure.include=health,jsonschemas.
{"registry": {"resources:schemas/order.json": {"type": "object", ...}},
"introspected": {"Book": {"$schema": "...", "title": "Book", ...}}}
Spring has no counterpart.
- Annotations
-
- @Endpoint(id: 'jsonschemas')
Constructors
- JsonSchemasEndpoint({JsonSchemaRegistry? registry, JsonSchemaGenerator? generator})
-
The endpoint of
registry(none: an emptyregistry) and of the classesgeneratorknows.
Properties
- generator → JsonSchemaGenerator
-
Makes the schemas of the
@Introspectedclasses.final - hashCode → int
-
The hash code for this object.
no setterinherited
- registry → JsonSchemaRegistry?
-
The context's registry;
nullwhen it has none.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
schema(
List< String> path) → Map<String, Object?> ? -
The schema named by
path: a class name, else a location of the registry (its segments joined by/);nullwhen there is none. -
schemas(
) → Map< String, Object?> - Every schema: those of the registry and those of the classes.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited