Package org.onosproject.rest
Class ApiDocProvider
- java.lang.Object
-
- org.onosproject.rest.ApiDocProvider
-
@Beta public class ApiDocProvider extends Object
Entity capable of providing REST API documentation resources.
-
-
Constructor Summary
Constructors Constructor Description ApiDocProvider(String key, String name, ClassLoader classLoader)
Creates a new REST API documentation provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
docs()
Returns input stream containing Swagger UI compatible JSON.String
key()
Returns the REST API key.InputStream
model()
Returns input stream containing JSON model schema.String
name()
Returns the REST API name.
-
-
-
Constructor Detail
-
ApiDocProvider
public ApiDocProvider(String key, String name, ClassLoader classLoader)
Creates a new REST API documentation provider.- Parameters:
key
- REST API keyname
- REST API nameclassLoader
- class loader
-
-
Method Detail
-
key
public String key()
Returns the REST API key.- Returns:
- REST API key
-
name
public String name()
Returns the REST API name.- Returns:
- REST API name
-
docs
public InputStream docs()
Returns input stream containing Swagger UI compatible JSON.- Returns:
- input stream with Swagger JSON data
-
model
public InputStream model()
Returns input stream containing JSON model schema.- Returns:
- input stream with JSON model schema
-
-