2.12. ActiveDocs
3scale toolbox を使用して、デベロッパーポータルの ActiveDocs の作成、更新、一覧表示、または削除を行います。
2.12.1. 新しい ActiveDocs の作成
OpenAPI/Swagger 準拠の API 定義から新しい ActiveDocs を作成するには、以下の手順を実施します。
API 定義を 3scale に追加し、オプションで名前を付けます。
3scale activedocs create <remote> <activedocs-name> <spec>
ActiveDocs の作成時に、以下のオプションを使用します。
Options -d --description=<value> Specify the description of the ActiveDocs -i --service-id=<value> Specify the Service ID associated to the ActiveDocs -p --published Specify it to publish the ActiveDoc on the Developer Portal. Otherwise it will be hidden -s --system-name=<value> Specify the system-name of the ActiveDocs --skip-swagger-validations Specify it to skip validation of the Swagger specification Options for ActiveDocs -c --config-file=<value> 3scale toolbox configuration file (default: $HOME/.3scalerc.yaml) -h --help show help for this command -k --insecure Proceed and operate even for server connections otherwise considered insecure -v --version Prints the version of this command --verbose Verbose mode- デベロッパーポータルに定義を 公開 します。
2.12.2. ActiveDocs の作成または更新
ActiveDoc が存在しない場合に新しく作成する、または新しい API 定義で既存の ActiveDocs を更新するには、以下のコマンドを使用します。
3scale activedocs apply <remote> <activedocs_id_or_system_name>
ActiveDocs の更新時に、以下のオプションを使用します。
Options
-d --description=<value> Specify the description of the
ActiveDocs
--hide Specify it to hide the ActiveDocs on
the Developer Portal
-i --service-id=<value> Specify the Service ID associated to
the ActiveDocs
--openapi-spec=<value> Specify the swagger spec. Can be a
file, an URL or '-' to read from
stdin. This option is mandatory when
applying the ActiveDoc for the first
time
-p --publish Specify it to publish the ActiveDocs
on the Developer Portal. Otherwise it
will be hidden
-s --name=<value> Specify the name of the ActiveDocs
--skip-swagger-validations Specify it to skip validation of the
Swagger specification
Options for ActiveDocs
-c --config-file=<value> 3scale toolbox configuration file
(default: $HOME/.3scalerc.yaml)
-h --help show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered
insecure
-v --version Prints the version of this command
--verbose Verbose mode2.12.3. ActiveDocs の一覧表示
以下の項目を含め、デベロッパーポータルのすべての ActiveDocs に関する情報を取得するには、以下のコマンドを使用します。
- id
- 名前
- システム名
- 説明
- 公開済み (つまり、デベロッパーポータルに表示可能) かどうか
- 作成日
- 最終更新日
以下のコマンドにより、定義済みの ActiveDocs がすべて一覧表示されます。
3scale activedocs list <remote>
ActiveDocs の一覧表示時に、以下のオプションを使用します。
Options for ActiveDocs
-c --config-file=<value> 3scale toolbox configuration file
(default: $HOME/.3scalerc.yaml)
-h --help show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered insecure
-v --version Prints the version of this command
--verbose Verbose mode2.12.4. ActiveDocs の削除
以下のコマンドにより、ActiveDocs が削除されます。
3scale activedocs delete <remote> <activedocs-id_or-system-name>
ActiveDocs の削除時に、以下のオプションを使用します。
Options for ActiveDocs
-c --config-file=<value> 3scale toolbox configuration file
(default: $HOME/.3scalerc.yaml)
-h --help show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered insecure
-v --version Prints the version of this command
--verbose Verbose mode