Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-2966

Document supported schemes for spec resources

XMLWordPrintable

      I've tried to create active doc with url with scheme file and it failed:

      $ 3scale activedocs create mkudlej hu3 'file://root/OpenAPI-Specification/examples/v2.0/yaml/petstore-expanded.yaml' -i 6
      ===== MESSAGE:
      
      SocketError: Failed to open TCP connection to root:80 (getaddrinfo: Name or service not known)
      
      ===== BACKTRACE:
      
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:939:in `rescue in block in connect'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:936:in `block in connect'
      /opt/rh/rh-ruby25/root/usr/share/ruby/timeout.rb:93:in `block in timeout'
      /opt/rh/rh-ruby25/root/usr/share/ruby/timeout.rb:103:in `timeout'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:935:in `connect'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:920:in `do_start'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:909:in `start'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:609:in `start'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:485:in `get_response'
      /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:462:in `get'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/resource_reader.rb:39:in `read_url'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/resource_reader.rb:26:in `call'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/resource_reader.rb:26:in `read_content'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/resource_reader.rb:9:in `load_resource'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/commands/activedocs_command/create_command.rb:46:in `activedocs_json_spec'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/commands/activedocs_command/create_command.rb:58:in `activedocs_attrs'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/commands/activedocs_command/create_command.rb:30:in `run'
      /usr/share/3scale_toolbox-0.11.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.9/lib/cri/command_runner.rb:34:in `call'
      /usr/share/3scale_toolbox-0.11.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.9/lib/cri/command_dsl.rb:303:in `block in runner'
      /usr/share/3scale_toolbox-0.11.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.9/lib/cri/command.rb:360:in `run_this'
      /usr/share/3scale_toolbox-0.11.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.9/lib/cri/command.rb:296:in `run'
      /usr/share/3scale_toolbox-0.11.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.9/lib/cri/command.rb:314:in `run'
      /usr/share/3scale_toolbox-0.11.0/vendor/bundle/ruby/2.5.0/gems/cri-2.15.9/lib/cri/command.rb:314:in `run'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/cli.rb:43:in `block in run'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/cli/error_handler.rb:5:in `block in error_watchdog'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/cli/error_handler.rb:11:in `error_watchdog'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/cli/error_handler.rb:5:in `error_watchdog'
      /usr/share/3scale_toolbox-0.11.0/lib/3scale_toolbox/cli.rb:40:in `run'
      /usr/share/3scale_toolbox-0.11.0/exe/3scale:15:in `<top (required)>'
      /usr/share/3scale_toolbox-0.11.0/bin/3scale:29:in `load'
      /usr/share/3scale_toolbox-0.11.0/bin/3scale:29:in `<main>'
      
      ===== DETAILED INFORMATION:
      
      A detailed crash log has been written to ./crash.log.
      

      I've tried different scheme than http(s) because there is mentioned URL in upstream docs:

      The swagger spec for the ActiveDocs is required. This is controlled with the positional parameter spec. It can be one of the following values:
      
          Filename in the available path.
          *URL* format. Toolbox will try to download content from given address.
      

      Also this description should be part of help message for create command.

      Te question is, does Toolbox use different URL schema than http(s)? if yes which ones?

              stmccart1@redhat.com Stephen McCarthy
              mkudlej@redhat.com Martin Kudlej
              Martin Kudlej Martin Kudlej
              Stephen McCarthy Stephen McCarthy
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: