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

File extension is missing in apiSpecification.resource when exporting API #528

Open
cmorasca opened this issue Dec 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cmorasca
Copy link

cmorasca commented Dec 19, 2024

APIM-CLI version

1.14.8

API-Management version

7.7.20240530

Bug description

When I try to export an API, it works normally. However, in the section that references the spec file (OAS) the filename is being exported without its extension, so if I try to import the config again I get an error.
Just adding the .json extension to the resource property makes the import work.

Portion of the exported API config WITHOUT the .json extension after export. (Should be "PetStore Banred.json")

{
  "name" : "PetStore Banred",
  "path" : "/v2",
  "state" : "unpublished",
  "version" : "1.0.7",
  "organization" : "Demo Axway",
  "apiSpecification" : {
    "resource" : "PetStore Banred"
  },
  "backendBasepath" : "https://petstore.swagger.io",
  "image" : "api-image.jpg",
  "inboundProfiles" : {
    "_default" : {
      "monitorAPI" : true,
...
...

If I try to reimport the API without any modification, I get the following error.

> apim api import -s demo -c ./v2/api-config.json
2024-12-19 20:34:58,658 [APIManagerCLI] INFO : API-Manager CLI: 1.14.8
2024-12-19 20:34:58,659 [APIManagerCLI] INFO : Module: API - I M P O R T  (1.14.8)
2024-12-19 20:35:00,923 [APIManagerAdapter] INFO : Successfully connected to API-Manager (7.7.20240530) on: https://demo.perceptiva.tech:8075
2024-12-19 20:35:01,776 [APISpecificationFactory] INFO : Reading API-Definition (Swagger/WSDL) from file: C:\Users\cmora\curso-git\apis\v2\PetStore Banred (absolute path)
2024-12-19 20:35:01,778 [APIImportApp] INFO : You may enable debug to get more details. See: https://github.com/Axway-API-Management-Plus/apim-cli/wiki/9.1.-Enable-Debug
2024-12-19 20:35:01,778 [APIImportApp] ERROR: Can't read API-Definition from file
                                 | Unable to read Swagger/WSDL file from: PetStore Banred
                                 | Unable to read Swagger/WSDL file from: PetStore Banred

Steps to reproduce

No response

Relevant log output

No response

@cmorasca cmorasca added the bug Something isn't working label Dec 19, 2024
@rathnapandi
Copy link
Member

Hi @cmorasca,

It fixed in develop branch. will be delivered as part of next release.

@rathnapandi rathnapandi self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants