Package com.linecorp.armeria.server.docs
Class ServiceSpecification
java.lang.Object
com.linecorp.armeria.server.docs.ServiceSpecification
The specification of one or more
Service
s that provides their ServiceInfo
s and
DescriptiveTypeInfo
s.-
Constructor Summary
ConstructorDescriptionServiceSpecification
(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions) Creates a new instance.ServiceSpecification
(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions, Iterable<HttpHeaders> exampleHeaders) Creates a new instance.ServiceSpecification
(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions, Iterable<HttpHeaders> exampleHeaders, @Nullable Route docServiceRoute) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the path pattern string of theDocService
mount location on server.enums()
Returns the metadata about the enums related with the services in this specification.Returns the example HTTP headers of the services in this specification.Returns the metadata about the exceptions related with the services in this specification.static ServiceSpecification
generate
(Iterable<ServiceInfo> services, Function<DescriptiveTypeSignature, ? extends DescriptiveTypeInfo> descriptiveTypeInfoFactory) Generates a newServiceSpecification
from the specifiedServiceInfo
s and the factoryFunction
that createsDescriptiveTypeInfo
s for the enum, struct or exception types referred by the specifiedServiceInfo
s.static ServiceSpecification
merge
(Iterable<ServiceSpecification> specs, Route docServiceRoute) Merges the specifiedServiceSpecification
s into one.services()
Returns the metadata about the services in this specification.structs()
Returns the metadata about the structs related with the services in this specification.
-
Constructor Details
-
ServiceSpecification
public ServiceSpecification(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions) Creates a new instance. -
ServiceSpecification
public ServiceSpecification(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions, Iterable<HttpHeaders> exampleHeaders) Creates a new instance. -
ServiceSpecification
public ServiceSpecification(Iterable<ServiceInfo> services, Iterable<EnumInfo> enums, Iterable<StructInfo> structs, Iterable<ExceptionInfo> exceptions, Iterable<HttpHeaders> exampleHeaders, @Nullable @Nullable Route docServiceRoute) Creates a new instance.
-
-
Method Details
-
merge
public static ServiceSpecification merge(Iterable<ServiceSpecification> specs, Route docServiceRoute) Merges the specifiedServiceSpecification
s into one. -
generate
public static ServiceSpecification generate(Iterable<ServiceInfo> services, Function<DescriptiveTypeSignature, ? extends DescriptiveTypeInfo> descriptiveTypeInfoFactory) Generates a newServiceSpecification
from the specifiedServiceInfo
s and the factoryFunction
that createsDescriptiveTypeInfo
s for the enum, struct or exception types referred by the specifiedServiceInfo
s. -
services
Returns the metadata about the services in this specification. -
enums
Returns the metadata about the enums related with the services in this specification. -
structs
Returns the metadata about the structs related with the services in this specification. -
exceptions
Returns the metadata about the exceptions related with the services in this specification. -
exampleHeaders
Returns the example HTTP headers of the services in this specification. -
docServiceRoute
Returns the path pattern string of theDocService
mount location on server.
-