-
Notifications
You must be signed in to change notification settings - Fork 7
Project specific Swagger Documentation
Nikita Shchienko edited this page Apr 1, 2019
·
3 revisions
The generic documentation on the REST API is available at http://files.cuba-platform.com/swagger/7.0.
Any running CUBA application also exports the project-specific documentation generated according to the Swagger specification version 2.0.
The documentation is available at the following URLs:
-
/rest/v2/docs/swagger.yaml
- YAML version of generic documentation. -
/rest/v2/docs/swagger.json
- JSON version of generic documentation. -
/rest/v2/docs/swaggerDetailed.yaml
- YAML version of project-specific Swagger documentation. -
/rest/v2/docs/swaggerDetailed.json
- JSON version of project-specific Swagger documentation.
For example:
http://localhost:8080/app/rest/v2/docs/swagger.yaml
http://localhost:8080/app/rest/v2/docs/swaggerDetailed.yaml
The documentation can be used to visualize, test or generate a client code for the REST API. See the following tools: Swagger UI, Swagger Inspector, Postman, Swagger Codegen.
The generated documentation includes:
- CRUD operations, such as:
- entity CRUD operations:
- Getting an Entity Instances List,
- filtering entities.
All CRUD parameters and responses have a model available, for example:
- Predefined REST queries:
- Exposed services:
- Home
- Predefined JPQL Queries Configuration
- Services Configuration
- Data Model Versioning
- CORS Settings
- Anonymous Access
- Other REST API Settings
- Creating Custom OAuth2 Protected Controllers
- Security Constraints for Collection Attributes
- Persistent Token Store
- Project-specific Swagger Documentation
- Application Properties
-
Using REST API
- Getting an OAuth Token
- REST API Authentication with LDAP
- Custom Authentication
- Getting an Entity Instances List
- New Entity Instance Creation
- Existing Entity Instance Update
- Executing a JPQL Query (GET)
- Executing a JPQL Query (POST)
- Service Method Invocation (GET)
- Service Method Invocation (POST)
- Files Downloading
- Files Uploading
- JavaScript Usage Example
- Getting Localized Messages
- Data Model Versioning Example
- Using Entities Search Filter