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

Version the APIs that are published to SwaggerHub #2834

Closed
paullatzelsperger opened this issue Apr 28, 2023 · 2 comments · Fixed by #3296
Closed

Version the APIs that are published to SwaggerHub #2834

paullatzelsperger opened this issue Apr 28, 2023 · 2 comments · Fixed by #3296
Assignees
Labels
build Anything related to the CI/CD Pipeline on Github Actions documentation Improvements or additions to documentation
Milestone

Comments

@paullatzelsperger
Copy link
Member

paullatzelsperger commented Apr 28, 2023

Feature Request

Currently we publish every iteration of our API spec as 0.0.1-SNAPSHOT, which should be improved. Every release of EDC should also produce a versioned API spec in SwaggerHub.

We should not do this on nightlies, because that would absolutely SPAM SwaggerHub.

Which Areas Would Be Affected?

build, CI

Why Is the Feature Desired?

Downstream projects use pinned versions of EDC, and they currently have no way of referencing their version of the EDC APIs.

Solution Proposal

  • improve the generation of the API to make the version input configurable:
// root build.gradle.kts
swagger {
       title.set((project.findProperty("apiTitle") ?: "EDC REST API") as String)
       description =
           (project.findProperty("apiDescription") ?: "EDC REST APIs - merged by OpenApiMerger") as String
       version = project.version // <-- this is new, ties it to the project version, override with -Pversion=...
       outputFilename.set(project.name)
       outputDirectory.set(file("${rootProject.projectDir.path}/resources/openapi/yaml"))
   }
  • make the apidoc.yaml workflow user-triggerable (workflow_dispatch)
  • avoid publishing API specs on nightlies
  • for manual triggering: add an optional version input to it and use that version input to set the API version
@paullatzelsperger paullatzelsperger self-assigned this Apr 28, 2023
@paullatzelsperger paullatzelsperger added documentation Improvements or additions to documentation build Anything related to the CI/CD Pipeline on Github Actions labels Apr 28, 2023
@paullatzelsperger paullatzelsperger added this to the Milestone 10 milestone Apr 28, 2023
@ndr-brt
Copy link
Member

ndr-brt commented Apr 28, 2023

duplicated of #2699 ? Maybe more detailed so we could close the other

@github-actions
Copy link

This issue is stale because it has been open for 28 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Jun 24, 2023
@juliapampus juliapampus removed the stale Open for x days with no activity label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Anything related to the CI/CD Pipeline on Github Actions documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants