You can view auto-generated OpenAPI Specification (OAS) documentation that describes the REST services that are included in your service package. The OpenAPI tab on REST service rule forms and service package rule forms displays the REST services in YAML and Swagger.
- In REST service rule forms, use the OpenAPI tab to view the OAS documentation that was generated for an individual REST service rule.
- In service package rule forms, use the OpenAPI tab to view the OAS documentation for all the service REST rules included in a specific service package.
- When you select Swagger on the OpenAPI tab, the Server field is displayed. This field lists the application alias URLs for the applications to which the logged-in user has access. To view the Swagger document for the REST services and service packages that belong to an application, select the application alias URL in the Server field. The UI displays the application alias URL, the application server, and the application alias, if applicable.
- Best practices for generating OpenAPI Specification documentation
OpenAPI Specification (OAS) documentation is automatically generated for every REST service rule. The OAS documentation for each REST service included in a service package is then combined into a single OAS document.
- Generating OpenAPI Specification documentation for application-specific REST APIs
You can list service packages that contain REST services in your application rule to include their OpenAPI Specification (OAS) documentation in your application's OAS documentation. All of the services that you list are documented together in a single application OAS landing page, which you can view in the application's API channel.
- Viewing application-specific REST APIs
View the OpenAPI Specification (OAS) documentation that describes your application's REST APIs in either App Studio or Dev Studio. You can also view the OAS documentation for individual REST services and for the REST services that are included in a service package.
- Using OAuth2 authentication with the Pega-provided Swagger UI
Authenticate with the Pega-provided Swagger UI so that you can test your Pega APIs, by creating an OAuth 2.0 client registration. Use the client ID and secret from your OAuth 2.0 client registration to define the scope of end-user access to the Swagger UI.