이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 1. Creating a new service based on OAS
1.1. Introduction 링크 복사링크가 클립보드에 복사되었습니다!
This documentation outlines the features of OpenAPI Specification (OAS) in Red Hat 3scale API Management 2.9 and provides steps to update an existing service or create a new one.
The following are special considerations about OAS in 3scale:
- You can also import OpenAPI specifications with the 3scale toolbox. For more details, see Importing OpenAPI definitions.
- Regarding OAS3.0, 3scale 2.8 introduces some changes. For more details, refer to Section 2.1, “Using OAS 3.0 with 3scale”.
1.2. Prerequisites 링크 복사링크가 클립보드에 복사되었습니다!
- OpenAPI Specification (OAS)
-
A 3scale 2.9 instance tenant credentials (
tokenorprovider_key)
1.3. Features of OpenAPI Specification 링크 복사링크가 클립보드에 복사되었습니다!
ActiveDocs are created/updated when importing OpenAPI (OAS)
-
Service’s
system_namecan be passed as an option parameter and defaults to info.title field from OAS. Methods are created for each operation from the OAS.
-
Method names are taken from
operation.operationIdfield.
-
Method names are taken from
All existing mapping rules are deleted before importing a new API definition.
- Methods will be not deleted if they exist before running the command.
- Mapping rules are created on each operation from the OAS.
The OpenAPI definition resource can be provided by one of the following channels:
- Filename in the available path
- URL format - toolbox will try to download from given address.
- Read from stdin standard input stream.
1.4. Using OpenAPI Specification 링크 복사링크가 클립보드에 복사되었습니다!
1.4.1. Detecting OpenAPI definition from the filename path 링크 복사링크가 클립보드에 복사되었습니다!
The allowed formats are json and yaml. The format is automatically detected from filename extension.
3scale import openapi -d <destination> /path/to/your/spec/file.[json|yaml|yml]
$ 3scale import openapi -d <destination> /path/to/your/spec/file.[json|yaml|yml]
1.4.2. Detecting OpenAPI definition from a URL 링크 복사링크가 클립보드에 복사되었습니다!
The allowed formats are json and yaml. The format is automatically detected from URL’s path extension.
3scale import openapi -d <destination> http[s]://domain/resource/path.[json|yaml|yml]
$ 3scale import openapi -d <destination> http[s]://domain/resource/path.[json|yaml|yml]
1.4.3. Detecting OpenAPI definition from stdin 링크 복사링크가 클립보드에 복사되었습니다!
The command line parameter for the OpenAPI resource is -.
The allowed formats are json and yaml. The format is automatically detected internally with parsers.
tool_to_read_openapi_from_source | 3scale import openapi -d <destination> -
$ tool_to_read_openapi_from_source | 3scale import openapi -d <destination> -