-
Notifications
You must be signed in to change notification settings - Fork 10
Update Swagger UI endpoints to include all parameters, specifically for multiple communities #820
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
Comments
@chuang-CE I have a suggestion: What if instead of having two versions of such endpoints in Swagger—one for the default community and the other for an explicit community—e.g.
we only leave the latter, but make the |
Personally, the concept of default community from a Registry is an overreach. Rather, I'd prefer Let the host of the Registry instance rewrite their custom URLs to their instance such as Feel free to create a separate issue for what I am discussing above and continue with a short term mitigation with @chuang-CE. Another alternative: Generally, when optional things come up, it should take our attention towards query-string parameters. |
I do agree that we shouldn't just double the number of definitions in Swagger. I also agree with Rohit's statement about using query-string parameters for the community name. Can we go with that approach instead? Ex: |
@edgarf @excelsior please reply to the comments here. |
Both suggested improvements would break the API. We can implement one of them (I, too, prefer the latter), but only in the next version of the API, while keeping the current version intact. Anyway, that's well out of scope of this task which is about revising and improving the Swagger UI. My previous question was solely about reducing the number of defs by half without making any drastic changes to the API. So if an endpoint has two signatures (short for the default community and full for any), are you OK with only seeing the full signature for the sake of brevity? |
@chuang-CE @rohit-joy Can one of you please address the latest question posted by @excelsior above so we can bring this issue to a mutually agreeable conclusion?. |
@excelsior Why does the query string option break the API spec that would require a new API version? |
@excelsior Can you please address the question posted by @rohit-joy above? |
@chuang-CE @rohit-joy Currenty, we have two kinds of signatures for most of the endpoints:
Just to make sure we're on the same page, you guys are suggesting to only support the latter kind of signature with an optional If it still has be supported, then it's hardly a simplification, quite contrary. If it doesn't then the API will become broken. However, if we consider the API to be unstable, then it's perfectly fine to drop the explicit signature, I guess. If we want to do that, let's open a separate issue for it, because this one is about improving the docs, without any changes to the API. |
@rohit-joy & @chuang-CE Please advise if we should create a separate issue at this time as suggested by @excelsiur above. |
@rohit-joy & @chuang-CE Just following up on my question above if we should create a separate issue at this point as suggested by @excelsiur above or if there is a different plan of action to be adopted from CE's perspective?.. |
@chuang-CE The Swagger updates regarding the missing endpoints are ready for review on staging: https://staging.credentialengineregistry.org/swagger/index.html |
The endpoint:
POST /resources/organizations/{organization_id}/documents
is missing definition for community_name, which the user is supposed to append to the front of this endpoint if the community they want to publish as is not set as the default envelope community. This needs to be made obvious to users when they read through the Swagger UI. If any other endpoints are missing optional parameters, add them in as well.
The text was updated successfully, but these errors were encountered: