5.12. ActiveDocs 생성

3scale toolbox를 사용하여 개발자 포털에서 ActiveDocs를 생성, 업데이트, 나열 또는 삭제합니다.

5.12.1. 새 ActiveDocs 생성

OpenAPI 사양과 호환되는 API 정의에서 새 ActiveDocs를 생성하려면 다음을 수행합니다.

  1. API 정의를 3scale에 추가하여 선택적으로 이름을 지정합니다.

    3scale activedocs create <remote> <activedocs-name> <specification>

    ActiveDocs에 대한 OpenAPI 사양이 필요하며 다음 값 중 하나여야 합니다.

    • 사용 가능한 경로의 파일 이름.
    • toolbox에서 콘텐츠를 다운로드할 수 있는 URL입니다. 지원되는 스키마는 httphttps 입니다.
    • stdin 표준 입력 스트림에서 읽습니다. 이 설정은 - 값을 설정하여 제어합니다.

      ActiveDocs를 생성하는 동안 다음 옵션을 사용하십시오.

      Options
          -d --description=<value>        Specify the description of
                                          the ActiveDocs
          -i --service-id=<value>         Specify the Service ID
                                          associated to the ActiveDocs
          -o --output=<value>             Output format on stdout: one
                                          of json|yaml
          -p --published                  Specify to publish the
                                          ActiveDocs on the Developer
                                          Portal. Otherwise it is hidden.
          -s --system-name=<value>        Specify the system-name of
                                          the ActiveDocs
             --skip-swagger-validations   Specify to skip validation
                                          of the Swagger specification
      Options for ActiveDocs
          -c --config-file=<value>        toolbox configuration file.
                                          Defaults to $HOME/.3scalerc.yaml
          -h --help                       Print help for this command
          -k --insecure                   Proceed and operate even for
                                          server connections otherwise
                                          considered insecure
          -v --version                    Print the version of this command
             --verbose                    Verbose mode
  2. 개발자 포털에 정의를 게시합니다.

5.12.2. ActiveDocs 생성 또는 업데이트

다음 명령을 사용하여 새 ActiveDocs가 없는 경우 새로 생성하거나 기존 ActiveDocs를 새 API 정의로 업데이트합니다.

3scale activedocs apply <remote> <activedocs_id_or_system_name>

ActiveDocs를 업데이트하는 동안 다음 옵션을 사용하십시오.

Options
  -d --description=<value>              Specify the description of the
                                        ActiveDocs
       --hide                           Specify to hide the ActiveDocs
                                        on the Developer Portal
 -i --service-id=<value>                Specify the Service ID associated
                                        to the ActiveDocs
 -o --output=<value>                    Output format on stdout:
                                        one of json|yaml
    --openapi-spec=<value>              Specify the Swagger specification.
                                        Can be a file, a URL or '-' to read
                                        from stdin. This is a mandatory
                                        option when applying the ActiveDoc
                                        for the first time.
 -p --publish                           Specify to publish the ActiveDocs
                                        on the Developer Portal. Otherwise
                                        it is hidden
 -s --name=<value>                      Specify the name of the ActiveDocs
    --skip-swagger-validations=<value>  Specify whether to skip validation
                                        of the Swagger specification: true
                                        or false. Defaults to true.

Options for ActiveDocs
    -c --config-file=<value>           3scale toolbox configuration file:
                                       defaults to $HOME/.3scalerc.yaml
    -h --help                          Print help for this command
    -k --insecure                      Proceed and operate even for server
                                       connections otherwise considered
                                       insecure
    -v --version                       Print the version of this command
       --verbose                       Verbose mode
참고

activedocs 동작은 3scale 2.8에서 --skip-swagger-validations를 적용합니다. activedocs apply를 사용하여 기존 스크립트를 업데이트해야 할 수도 있습니다. 이전에는 각 activedocs apply 명령에 이 옵션을 지정하지 않은 경우 유효성 검사를 건너뛰지 않았습니다. 이제 기본적으로 --skip-swagger-validationstrue 입니다.

5.12.3. ActiveDocs 나열

다음 명령을 사용하여 다음을 포함하여 개발자 포털의 모든 ActiveDocs에 대한 정보를 가져옵니다.

  • id
  • name
  • 시스템 이름
  • description
  • 게시됨(즉, 개발자 포털에 표시될 수 있음)
  • 생성 날짜
  • 최신 업데이트 날짜

다음 명령은 정의된 모든 ActiveDocs를 나열합니다.

3scale activedocs list <remote>

ActiveDocs를 나열하는 동안 다음 옵션을 사용하십시오.

Options
    -o --output=<value>           Output format on stdout:
                                  one of json|yaml
    -s --service-ref=<value>      Filter the ActiveDocs by service
                                  reference
Options for ActiveDocs
    -c --config-file=<value>      3scale toolbox configuration file:
                                  defaults to $HOME/.3scalerc.yaml
    -h --help                     Print help for this command
    -k --insecure                 Proceed and operate even for server
                                  connections otherwise considered insecure
    -v --version                  Print the version of this command
       --verbose                  Verbose mode

5.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:
                                  defaults to $HOME/.3scalerc.yaml
    -h --help                     Print help for this command
    -k --insecure                 Proceed and operate even for server
                                  connections otherwise considered insecure
    -v --version                  Print the version of this command
       --verbose                  Verbose mode