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

Issues exporting and importing an API #460

Closed
emmanuel-galindo opened this issue Mar 7, 2024 · 1 comment
Closed

Issues exporting and importing an API #460

emmanuel-galindo opened this issue Mar 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@emmanuel-galindo
Copy link

APIM-CLI version

1.14.2

API-Management version

7.7.20231130

Bug description

We are exporting an API, and then importing it back again. And we are getting strange behaviors:

  1. it detects a change in the apiDefinition file
  2. it creates a new API without the -force
  3. it marks it as a non-breaking, and breaking with a difference of a couple of lines

Our desired behavior would be

  1. as we are not changing anything, it should report the usual "no changes detected between desired and actual"
  2. we want to avoid by all means APIs to be recreated (we rely on existing API ids for several purposes, and we want to keep the created date value)
  3. we want to be reassured that not introducing force doesn't lead to applying breaking changes.

Log is showing:
"INFO : Is Breaking changes : false Enforce Breaking changes : false"

and then:
"DEBUG: Apply breaking changes: [apiDefinition] & and Non-Breaking: [], for UNPUBLISHED"

more lines:
2024-03-07 15:32:02,989 [APIImportManager] INFO : Recognized the following changes. Potentially Breaking: [apiDefinition] plus Non-Breaking: []
2024-03-07 15:32:02,990 [APIImportManager] INFO : Is Breaking changes : false Enforce Breaking changes : false
2024-03-07 15:32:02,990 [APIImportManager] INFO : Update API Strategy: Re-Create API as changes can't be applied to existing API.
2024-03-07 15:32:02,990 [APIImportManager] DEBUG: Apply breaking changes: [apiDefinition] & and Non-Breaking: [], for UNPUBLISHED
2024-03-07 15:32:02,991 [RecreateToUpdateAPI] INFO : Create new API to update existing: Test - OAS3 (ID: 3c13181e-4e84-4a74-95f3-48d67103d0aa)

Steps to reproduce

I am going to share with you on a private email the .dat export for you to export/import ; and the complete debug

commands executed:
$ apim api get -h localhost -u apiadmin -p changeme3 -id 3c13181e-4e84-4a74-95f3-48d67103d0aa -o json
$ apim api import -h localhost -u apiadmin -p changeme3 -c .\testoas3error\api-config.json -a '.\testoas3error\Test - OAS3.json'

Relevant log output

sensible information, so sent via private email
@emmanuel-galindo emmanuel-galindo added the bug Something isn't working label Mar 7, 2024
@rathnapandi rathnapandi self-assigned this Mar 7, 2024
rathnapandi pushed a commit that referenced this issue Mar 8, 2024
rathnapandi pushed a commit that referenced this issue Mar 8, 2024
@rathnapandi
Copy link
Member

Hi @emmanuel-galindo
Use axway-apimcli-1.14.4-SNAPSHOT.zip to test the fix.

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