Java

Java Frameworks and Libraries supported by NightVision API Discovery

The following section covers the components of Java frameworks and their library components that NightVision’s API Discovery capability can detect and use to generate OpenAPI documentation. If a component that you use is not supported, please get in touch with our support team at [email protected], and we can add this as a new feature.

Java EE / Jakarta EE

javax.annotation / jakarta.annotation

Library ComponentDescription
Generated (Java EE/Jakarta EE)Used to mark source code that has been generated.
security.DenyAll (Java EE /Jakarta EE)Specifies that no security roles are allowed to access the endpoint
security.PermitAll (Java EE /Jakarta EE)Specifies that all security roles are allowed to access the endpoint
security.RolesAllowed (Java EE /Jakarta EE)Specifies the list of security roles permitted to access endpoint

javax.servlet.http / jakarta.servlet.http

Library ComponentDescription
HttpServletRequest Java EE/Jakarta EEProvides request information for HTTP servlets
HttpServletResponse Java EE /Jakarta EESpecifies that no security roles are allowed to access the endpoint

JAX-RS / Jersey

javax.ws.rs.core

Library ComponentDescription
MediaTypeAn abstraction for a media type
ContextUsed to inject information into a class field, bean property or method parameter.

javax.ws.rs

Library ComponentDescription
GETIndicates that the annotated method responds to HTTP GET requests.
POSTIndicates that the annotated method responds to HTTP POST requests.
PUTIndicates that the annotated method responds to HTTP PUT requests.
DELETEIndicates that the annotated method responds to HTTP DELETE requests.
HEADIndicates that the annotated method responds to HTTP HEAD requests.
OPTIONSIndicates that the annotated method responds to HTTP OPTIONS requests.
ApplicationPathIdentifies the application path that serves as the base URI for all resource URIs provided by Path. May only be applied to a subclass of Application.
PathIdentifies the URI path that a resource class or class method will serve requests for.
PathParamBinds the value of a URI template parameter or a path segment containing the template parameter to a resource method parameter, resource class field, or resource class bean property.
QueryParamBinds the value(s) of a HTTP query parameter to a resource method parameter, resource class field, or resource class bean property.
FormParamBinds the value(s) of a form parameter contained within a request entity body to a resource method parameter.
HttpMethodAssociates the name of a HTTP method with an annotation.

Spring Boot

NightVision supports the annotations below for classes, interfaces, methods and parameters.

org.springframework.stereotype

Library ComponentDescription
ControllerIndicates that an annotated class is a "Controller" (e.g. a web controller).

org.springframework.web.bind.annotation

Library ComponentDescription
RequestMappingAnnotation for mapping web requests onto methods in request-handling classes with flexible method signatures.
RestControllerA convenience annotation that is itself annotated with @Controller and @ResponseBody.
ResponseBodyAnnotation that indicates a method return value should be bound to the web response body. Supported for annotated handler methods.
DeleteMappingAnnotation for mapping HTTP DELETE requests onto specific handler methods.
GetMappingAnnotation for mapping HTTP GET requests onto specific handler methods.
PatchMappingAnnotation for mapping HTTP PATCH requests onto specific handler methods.
PostMappingAnnotation for mapping HTTP POST requests onto specific handler methods.
PutMappingAnnotation for mapping HTTP PUT requests onto specific handler methods.
PathVariableAnnotation which indicates that a method parameter should be bound to a URI template variable. Supported for RequestMapping annotated handler methods.

org.springframework.data.rest.core.annotation

Library ComponentDescription
RepositoryRestResourceAnnotation marking a repository class to autogenerate routes and handlers for CRUD operations over that repository
RestResourceAnnotation marking a Repository to influence how it is exported and what the routes will be links.

Micronaut

io.micronaut.http

Library ComponentDescription
HttpHeadersConstants for common HTTP headers
HttpHeaders.acceptReturn a list of accepted MediaType instances
HttpHeaders.contentTypeGet the request or response content type
HttpHeaders.getAuthorizationGet the Authorization header
HttpHeaders.getContentTypeGet the Content-Type header
HttpHeaders.getOriginGet the Origin header
HttpMethodEnum containing the valid HTTP methods
HttpParametersRepresents HTTP query parameters parsed from the request URI
HttpRequestInterface to access HTTP request properties
HttpRequest.getHeadersGet the HttpHeaders object for the request
HttpRequest.getParametersGet the HTTP parameters from the URI query string
HttpResponseInterface to access HTTP response properties and set response status codes
HttpStatusRepresents HTTP status codes
MediaTypeRepresents a media type

io.micronaut.http.annotation

Library ComponentDescription
BodyIndicates that the method argument is bound from the HTTP body
ConsumesIndicates the MediaTypes consumed by a particular component
ControllerIndicates that the role of a class is a controller within an application
CookieValueIndicates that the method argument is bound from an HTTP cookie
CustomHttpMethodIndicates that the method receives a request with a non-standard method
DeleteIndicates that the method receives a DELETE request
ErrorMaps a method to an error route
GetIndicates that the method receives a GET request
HeadIndicates that the method receives a HEAD request
HeaderIndicates that the method argument is bound from an HTTP header
OptionsIndicates that the method receives an OPTIONS request
PartIndicates that the method argument is bound from a specific part of a "multipart/form-data" request
PatchIndicates that the method receives a PATCH request
PathVariableBinds a parameter exclusively from a path variable
PostIndicates that the method receives a POST request
ProducesIndicates the MediaTypes produced by a particular component
PutIndicates that the method receives a PUT request
QueryValueBinds a method parameter to a value in the query string or path of the URI
RequestAttributeIndicates that a method argument is bound to an HTTP request attribute
RequestBeanUsed to bind Bindable parameters to a Bean object
StatusSets alternative HttpStatus response code when applied to a method
TraceIndicates that the method receives a TRACE request

io.micronaut.security

Library ComponentDescription
annotation.SecuredConstants for common HTTP headers
rules.SecurityRuleInforms the SecurityFilter filter what to do with the given request