Package com.linecorp.armeria.server.docs
Class ServiceSpecification
java.lang.Object
com.linecorp.armeria.server.docs.ServiceSpecification
@UnstableApi public final class ServiceSpecification extends Object
-
Constructor Summary
Constructors Constructor Description ServiceSpecification(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. -
Method Summary
Modifier and Type Method Description Set<EnumInfo>
enums()
Returns the metadata about the enums related with the services in this specification.List<HttpHeaders>
exampleHeaders()
Returns the example HTTP headers of the services in this specification.Set<ExceptionInfo>
exceptions()
Returns the metadata about the exceptions related with the services in this specification.static ServiceSpecification
generate(Iterable<ServiceInfo> services, Function<TypeSignature,? extends NamedTypeInfo> namedTypeInfoFactory)
Generates a newServiceSpecification
from the specifiedServiceInfo
s and the factoryFunction
that createsNamedTypeInfo
s for the enum, struct or exception types referred by the specifiedServiceInfo
s.static ServiceSpecification
merge(Iterable<ServiceSpecification> specs)
Merges the specifiedServiceSpecification
s into one.Set<ServiceInfo>
services()
Returns the metadata about the services in this specification.Set<StructInfo>
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.
-
-
Method Details
-
merge
Merges the specifiedServiceSpecification
s into one. -
generate
public static ServiceSpecification generate(Iterable<ServiceInfo> services, Function<TypeSignature,? extends NamedTypeInfo> namedTypeInfoFactory)Generates a newServiceSpecification
from the specifiedServiceInfo
s and the factoryFunction
that createsNamedTypeInfo
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.
-