-
Notifications
You must be signed in to change notification settings - Fork 230
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
Resove issue #1623-Devops API swagger #1628
Conversation
Semantic error at paths./things/{thingId}/features.patch.parameters.1.name Path parameter "featureId" must have the corresponding {featureId} segment in the "/things/{thingId}/features" path Jump to line 2071
Hi @neottil What I noticed: Please adjust the year in the copyright header for each new file to Did you have a specific reason to provide another top-level OpenAPI file and not merge the "devops" commands in the main OpenAPI file? |
Hi, |
I would really prefer that - otherwise we would also need to provide different APIs to the "dropdown". |
Ok, so I add the servers and the tags to the already existing file? The authentication will have to be done as for /connections |
Yes, all to the ditto-api-2.yml Cool that you figured out so quickly how the build and module mechanism works there 💯 |
Will it be clear that the new API's will need to be run by selecting the /devops server? |
True, I did not think about that caused by the different entry point in the API. Can the devops resources then only be shown if the /devops server is chosen? |
I don't know. I will look for information in the next few days and will
keep you updated.
this was also a reason I decided to keep the APIs separate.
Il ven 28 apr 2023, 18:58 Thomas Jaeckle ***@***.***> ha
scritto:
… True, I did not think about that caused by the different entry point in
the API.
Can the devops resources then only be shown if the /devops server is
chosen?
—
Reply to this email directly, view it on GitHub
<#1628 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUBQKDRQURBX4YFJVVD3I7TXDPZKHANCNFSM6AAAAAAXO7KG4A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I've been looking for a solution to hide the APIs based on server selection, but I haven't found anything. I discovered the possibility of using variables also in the server path, in this way we could configure only 2 servers (one sandbox and one local) by parameterizing the final part (api/2 or devops). https://swagger.io/docs/specification/api-host-and-base-path/ (Server Templating paragraph) |
Or, we could add the Could however be a little overwhelming, I did not yet try it out and reviewed in swagger ui. |
I await your news and instructions |
Please generate all apis to a single file, change the servers to serve at |
… old api entry point in /api/2. Add new devops api with entry point /devops and devops credentials.
I've modify swagger file such agreed. If there are any other details to review let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @neottil
Looks already very promising, thanks a lot.
Could you please add "DevOps: " as prefix for the new sections.
That way those are "grouped" a little bit better.
Or should/could we even just have 1 category instead of 3 for "DevOps"?
What do you think?
Edit: I think it would be sufficient to have a single "DevOps Resources" section combining the devops endpoints.
I think that as api/2 is split into groups devops should be too. As already mentioned, I think it's always better to divide where you can. It can help in code management. However, if you prefer to have only one devops group because it is more understandable, I will do this. |
I think it is too overwhelming to have that much groups on top level for the "operator" (Admin) of the Ditto installation. I would therefore really prefer to only have a single "Devops" section. |
@neottil I will have a more detailed look soon. Regarding availability in the Helm chart: the Helm chart downloads the openapi definition file for its app version via GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neottil I finally got the chance to have a close look and try it out.
Great contribution - thanks a lot 👍
LGTM
I create new devops-index.yml file for creation of ditto-devops.yml swagger file. The new files referred as path, parameter, schemas have been divided following the existing example. I reported what I found in the documentation and by looking at the code.
Please take a look and suggest correction if needed.
This new swagger file will have to be integrated into the helm project, could you give me some information about it? The api swagger i saw is made available via a url.
i have also fixed an openapi error: "Semantic error at paths./things/{thingId}/features.patch.parameters.1.name
Path parameter "featureId" must have the corresponding {featureId} segment in the "/things/{thingId}/features" path"
Luca
Resolves: #1623