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

API name cannot have a empty space #398

Closed
lpastor74 opened this issue Sep 29, 2021 · 8 comments · Fixed by wso2/apim-apps#519, wso2/docs-apim#7467 or wso2/carbon-apimgt#12200
Closed

Comments

@lpastor74
Copy link

Describe your problem(s)

as of now, it is not possible to create an API name with empty space in the publisher.
Sometimes API names consist of two words and the only option is to use the Camile style with is not very esthetic.

Describe your solution

Can we have an API and addition parameters like 'display name' and use that in DevPortal?
The name will be still used for uniqueness but display name would be used in DevPortal

@bhathiya
Copy link
Contributor

Thanks for the suggestion. We will consider this in a future version.

@dushaniw dushaniw transferred this issue from wso2/product-apim Jul 6, 2022
@dushaniw dushaniw assigned shnrndk and unassigned Tharsanan1 Oct 16, 2023
@shnrndk
Copy link

shnrndk commented Oct 30, 2023

Update 27/10/2023

  • Checked the feasibility of including spaces to the API name and Changing the API provider.
  • Created feasibility doc[1].
  • There were some issues happened in both of these tasks, which were explained in this doc [1].
  • On 20/10/2023 had a meeting with Sanjeewa, Nandika, Dushani and Thilini regarding this issues. And suggested me to keep looking for the solutions for these issues.
  • For the search issues when we are search in publisher portal when including the spaces in api name, we are using "%20" instead of search in the backend.
  • To api provider change manually, these things needs to done.
    1. Change the Api provider artifact in the registry for that API.
    2. Change the api provider path, by renaming/changing the name of the api provider root folder.
    3. Change the api provider name in the AM_API table in the db.
  • The various problems have arose by using steps.
    1. The APIs did not appeared in the publisher portal as well dev portal.
    2. The total api count in the publisher portal was wrong.
  • After having several discussions with Prasanna we have found that, there is method written in the registry, registry.move() . By using this method we can easily change the path. For example
registry.move("/_system/governance/apimgt/applicationdata/provider/admin/PizzaShackAPI/1.0.0/api",
                "/_system/governance/apimgt/applicationdata/provider/sahan/PizzaShackAPI/1.0.0/api");

to

registry.move("/_system/governance/apimgt/applicationdata/provider/admin/PizzaShackAPI/1.0.0/swagger.json",
                "/_system/governance/apimgt/applicationdata/provider/sahan/PizzaShackAPI/1.0.0/swagger.json");

@shnrndk
Copy link

shnrndk commented Nov 13, 2023

Update 10/11/2023

  • When checking the feasibility of including spaces to the API name, it is necessary to check with APICTL imports and exports when there is api name with with spaces.
  • This was previously disallowed by this PR: https://github.com/wso2/carbon-apimgt/pull/8305/files
  • But we can't find the codelines which were changed by this PR, in the 4.2 branch and the master branch.
  • Checked the APICTL imports and exports when there is api name with with spaces.
  • When exporting we need to include the api name in spaces.
    apictl import api -f "./Test API 123" -e production
    When importing we can have \ symbol between space or use "".
    Ex:-
    ./apictl import api -f "dev/Test API 123_1.0.0.zip" -e dev
    ./apictl import api -f dev/Test\ API\ 123_1.0.0.zip -e dev
  • Started to implement the api provider name change feature
  • Added the method changeApiProvider() in the RegistryPersistenceImpl.java, In this method the logic is
    1.) First move the registry path to the new api provider
    2.) Then change the API provider artifact in the new registry provider path
  • There was an issue occured when testing the new implementation, the apis doesn't display properly in the publisher portal and the devportal.
  • But in the debug mode this error wasn't occured. I think the reason for this issue is, after moving the registry path to new api provider, it needs some seconds to reindex, then only we can change the API provider artifact. I have put the thread.sleep(5000) in the middle of these 1 and 2 steps, then this issue wasn't occured.

@shnrndk
Copy link

shnrndk commented Dec 4, 2023

Update 4/12/2023

  • Completed the UI part
  • Completed the backend
  • Currently doing the docs part
  • Noticed a bug in the api revision restore
  • Scheduled the code review 5/12/2023

@shnrndk
Copy link

shnrndk commented Dec 5, 2023

list of PRs

Change Api Provider PR: wso2/carbon-apimgt#12200
UI PR: wso2/apim-apps#519
Doc PR: wso2/docs-apim#7467
Intergration Test PR: wso2/product-apim#13304

@shnrndk
Copy link

shnrndk commented Dec 21, 2023

Update 18/12/2023

  • Tested the reasons for the failures.
  • The test failures occurred because the newly added scopes were not included in the tenant.confs within the product-apim repo.
  • To pass these failed tests, we need to merge the carbon-apim PR and Product-apim PR together.

@npamudika npamudika added this to the 4.3.0-M1 milestone Jan 3, 2024
@npamudika npamudika added 4.3.0 4.3.0-M1 4.3.0 M1 Milestone labels Jan 3, 2024
@npamudika npamudika reopened this Jan 19, 2024
@npamudika npamudika added 4.3.0-alpha and removed 4.3.0-M1 4.3.0 M1 Milestone labels Jan 19, 2024
@npamudika npamudika modified the milestones: 4.3.0-M1, 4.3.0-Alpha Jan 19, 2024
@npamudika
Copy link

Need to merge the 3 PRs after getting the review comments resolved and approved - wso2/product-apim#13304, wso2/apim-apps#519, wso2/carbon-apimgt#12200

@lpastor74
Copy link
Author

Do we have a plan to release the patch for the 4.2 version?

@npamudika npamudika modified the milestones: 4.3.0-Alpha, 4.3.0-M2 Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment