azureazure-api-managementoas

Azure API Management: Import definition with components.schemas pointer to external URL


Now, im trying to import new API definitios with Externally Defined Components like: OAS 3.x documentation capture

But, in all of cases, we retreive the definition object blank: Result of the import in APIM

The specification points to URL like this:

components:
  schemas:
    Command:
      $ref: "https://xxxxxxxxxxx/docs-and-specs/published/products/connect_your_fleet/swagger/command_management_external.yaml#/components/schemas/Command"

I've tried with various methods, but It generates the same.

Any idea? Has a restriction to import this format the APIM? The documentation hasn't any reference about this restriction.. (https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions)

Some solution or clarifying answer please...


Solution

  • The documentation mentions that you can't reference external URLs so that is not possible. You need to embed the schema in the same file.

    https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions

    enter image description here