Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import swagger-json (v3) to Api management #501

Closed
baoduy opened this issue Mar 28, 2020 · 6 comments
Closed

Import swagger-json (v3) to Api management #501

baoduy opened this issue Mar 28, 2020 · 6 comments

Comments

@baoduy
Copy link

baoduy commented Mar 28, 2020

When import swagger json file (v3). I got the below error.

error: 1 error occurred:
Original Error: autorest/azure: Service returned an error. Status=400 Code="ValidationError" Message="One or more fields contain incorrect values:" Details=[{"code":"ValidationError","message":"Parsing error(s): The Swagger version specified is unknown.","target":"representation"}]       

Here is swagger sample

{
   openapi: "3.0.1",
   info: {
      title: "API",
      description: "The API.",
}

However, I was imported successfully from the Azure Portal. Is it because Terreform is not supporting openapi 3.x document version yet?

@mikhailshilkov
Copy link
Member

@baoduy I believe this is tracked in hashicorp/terraform-provider-azurerm#3203

@baoduy
Copy link
Author

baoduy commented Mar 28, 2020

Thanks @mikhailshilkov, Hope terraform will support the openapi 3 soon. For workaround I'm using this library to convert to swagger 2 and imported to management successfully.

@mikhailshilkov
Copy link
Member

Great to hear you could make progress there! As there isn't much we can do, I'll close the issue anf let's track on the terraform side.

@mastoj
Copy link

mastoj commented Dec 5, 2020

@mikhailshilkov I see the same issue with nextgen, is nextgen also using the terraform provider?

@mikhailshilkov
Copy link
Member

@mastoj No, nextgen does not use the TF provider. It looks like the TF issue was fixed by upgrading to newer API versions?

@mastoj
Copy link

mastoj commented Dec 5, 2020

Ok, then I'll open an issue in the nextgen repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants