Description
Reason/Context
This is required in CI if there is a need to perform further operations on the created/updated service which need service id.
Alternative to this is a multi-step process:
- Upload the artifact via API
- Read the OAS to form the service name with title and version as Microcks does
- Query and filter the services with the formed service name to get the service id
- Use the fetched service id for further operations
Steps 2 and 3 could be avoided with this change.
Description
Update the microcks openapi spec to change response type of /artifact/upload api from string to object to return additional information, esp created/updated service id. This could be a breaking change in the front-end as well as for the consumers of the api if it is being used directly in CI.
Implementation ideas
I am willing to contribute a PR for this change. On the surface, the changes seem to be:
- Update the microcks openapi spec to change response type of /artifact/upload api from string to object to return additional information, esp created/updated service id.
- Update the backend
UploadArtifactController
to return object with service id, name and version at the very least. Suggestions for more fields/entire service are welcome. - Update the frontend
uploader.dialog.*
to accomodate the backend changes.
I was also thinking about using OAS codegen to generate backend server and frontend client, but that should be a separate topic. Let me know if it all makes sense, so that I can start the work on it. Thanks!