apigee / apigee-api-catalog-drupal

Manage your API catalog within Drupal's content management approach
https://www.drupal.org/project/apigee_api_catalog
GNU General Public License v2.0
17 stars 16 forks source link

Creating API Doc using File URL, gives validation error : URI is not valid. It works fine with File Upload only. #171

Closed samhaldia closed 2 years ago

samhaldia commented 2 years ago

Description

When we try to create API Doc using File URI, it gives URI is not valid. It works fine with File Upload only.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to 'node/add/apidoc' and enter other required fields
  2. Select Specification source type 'URL'
  3. Enter Value of URL to OpenAPI specification file ex: 'https://petstore.swagger.io/v2/swagger.yaml'

Actual Behavior

It gives 'https://petstore.swagger.io/v2/swagger.yaml is not a valid link'

Expected Behavior

It should parse URL and create API Doc from URL.

Screenshots

image

Version Info

apigee_api_catalog:8.x-2.6 Drupal Core: 9.2.8 PHP: 7.4.20

phdhiren commented 2 years ago

@samhaldia

Can you check connection between your server and petstore.swagger.io server? Above is valid and should work.

samhaldia commented 2 years ago

@phdhiren

Thanks yes it was the firewall blocking it. The flow is as designed not a bug. Thanks for providing input Is there way to customize the module to use authorization headers to allow URL to pass in such case?