Skip to content

Return more info, esp service id, in /artifact/upload api response #1608

Open
@i-m-addycoder

Description

@i-m-addycoder

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:

  1. Upload the artifact via API
  2. Read the OAS to form the service name with title and version as Microcks does
  3. Query and filter the services with the formed service name to get the service id
  4. 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:

  1. 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.
  2. 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.
  3. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions