Open
Description
I couldn't find in the docs whether OpenAPI
's getters can return null
. For example, could the following code throw a NullPointerException
?
private static Optional<Schema> getSchemaRef(String id, OpenAPI openAPI) {
return Optional.ofNullable(openAPI.getComponents().getSchemas().get(id));
}
It would be helpful to have it explicitly stated in the #getComponents()
and #getSchemas()
Javadoc whether they can or cannot return null
values, or if it's up to the implementation."