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

feat(doc): update the verification and generation of OpenAPI spec files #2209

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented Nov 15, 2022

What this PR changes/adds

  • applies the apiGroup property to all API-producing modules
  • adds project properties to set the API title and description at runtime (-PapiTitle="some title" -PapiDescription="some description")
  • Moves all OpenAPI related Github Action jobs out into a new workflow called apidoc.yaml that:
    • merges each API group into its own file
    • publishes all APIs to SwaggerHub

Why it does that

Improve API separation and documentation

Further notes

  • publishing to SwaggerHub is currently a placeholder, because EDC doesn't have an account there yet.
  • publishing to swaggerhub can be verified only after this PR is merged, because the necessary secret (SWAGGERHUB_TOKEN) is only present on the upstream repo
  • embedded Swagger UI (docs/swaggerui) was deleted

Linked Issue(s)

Closes #2206
Closes #2163

Checklist

  • added appropriate tests?
  • performed checkstyle check locally?
  • added/updated copyright headers?
  • documented public classes/methods?
  • added/updated relevant documentation?
  • assigned appropriate label? (exclude from changelog with label no-changelog)
  • formatted title correctly? (take a look at the CONTRIBUTING and Etiquette for pull requests for details)

@github-actions github-actions bot added this to In progress in Connector Nov 15, 2022
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:00 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from f5b6ace to 6dcf1dd Compare November 15, 2022 08:00
@paullatzelsperger paullatzelsperger added documentation Improvements or additions to documentation api Feature related to the (REST) api build Anything related to the CI/CD Pipeline on Github Actions labels Nov 15, 2022
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:01 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 6dcf1dd to b034c96 Compare November 15, 2022 08:04
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:05 Inactive
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:16 Inactive
@paullatzelsperger paullatzelsperger marked this pull request as ready for review November 15, 2022 08:32
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2022

Codecov Report

Base: 64.81% // Head: 64.66% // Decreases project coverage by -0.14% ⚠️

Coverage data is based on head (5ca2bdd) compared to base (1226275).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2209      +/-   ##
==========================================
- Coverage   64.81%   64.66%   -0.15%     
==========================================
  Files         828      830       +2     
  Lines       17452    17460       +8     
  Branches     1091     1091              
==========================================
- Hits        11312    11291      -21     
- Misses       5690     5719      +29     
  Partials      450      450              
Impacted Files Coverage Δ
...nector/dataplane/client/RemoteDataPlaneClient.java 86.66% <0.00%> (-6.67%) ⬇️
...ceiver/http/HttpEndpointDataReferenceReceiver.java 85.29% <0.00%> (-6.14%) ⬇️
...actnegotiation/ContractNegotiationServiceImpl.java 94.44% <0.00%> (-5.56%) ⬇️
...ector/provision/http/HttpProvisionerExtension.java 88.23% <0.00%> (-2.68%) ⬇️
...ent/transferprocess/TransferProcessHttpClient.java 80.00% <0.00%> (-1.82%) ⬇️
.../org/eclipse/edc/junit/testfixtures/TestUtils.java 33.84% <0.00%> (-1.64%) ⬇️
...selector/client/RemoteDataPlaneSelectorClient.java 62.22% <0.00%> (-1.61%) ⬇️
...nector/dataplane/http/pipeline/HttpDataSource.java 81.81% <0.00%> (-1.52%) ⬇️
...ultipart/dispatcher/sender/IdsMultipartSender.java 82.41% <0.00%> (-0.38%) ⬇️
...pse/edc/event/cloud/http/CloudEventsPublisher.java 91.17% <0.00%> (-0.26%) ⬇️
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:38 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 76dfd75 to 1cfef37 Compare November 15, 2022 08:51
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:51 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 1cfef37 to 4d7bba8 Compare November 15, 2022 08:51
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 08:52 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 4d7bba8 to f718853 Compare November 15, 2022 11:32
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 11:33 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from f718853 to 324909f Compare November 15, 2022 11:38
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 11:40 Inactive
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 11:40 Inactive
Connector automation moved this from In progress to Review in progress Nov 15, 2022
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 324909f to 1592ffb Compare November 15, 2022 14:59
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev November 15, 2022 15:00 Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch 2 times, most recently from 71ac456 to 06cd9b6 Compare November 30, 2022 14:07
Copy link
Member

@ndr-brt ndr-brt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we wait to have the swagger hub uploaded and reachable from the docs site before removing the current swaggerui? Just to avoid 404s in the meantime.

on:
push:
pull_request:
branches: [ main ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this branches: [ main ] need to be moved under the push block?
Otherwise this workflow will be executed for every push and this pull_request block would be useless.

Copy link
Member Author

@paullatzelsperger paullatzelsperger Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the upstream repo, the only pushes should be merged PRs to main, so in reality it'll be the same thing. I copied the declaration from the verify.yaml.

@paullatzelsperger
Copy link
Member Author

paullatzelsperger commented Dec 1, 2022

Could we wait to have the swagger hub uploaded and reachable from the docs site before removing the current swaggerui? Just to avoid 404s in the meantime.

Due to the fact that we don't have one single yaml file anymore, but one per api we cannot (easily) generate embedded swagger UI anymore, and if I leave the old one in, it'll be incorrect and won't reflect the code.
Also, we're talking about updating one or two lines in the docs repo, which makes this amount of work (investigate swagger UI with multiple files, creating another PR to remove the embedded swagger later) seem a bit much.

@ndr-brt
Copy link
Member

ndr-brt commented Dec 1, 2022

@paullatzelsperger I don't say that we need to keep the process of ui generation, just to leave the static files there for some times until we have a replacement for them

@paullatzelsperger
Copy link
Member Author

@paullatzelsperger I don't say that we need to keep the process of ui generation, just to leave the static files there for some times until we have a replacement for them

If we do that, it should be clear to anyone looking at it, that they're looking at a potentially outdated version of the API. But we can do it.

@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 7860511 to 17e8bdf Compare December 2, 2022 15:44
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 2, 2022 15:45 Inactive
@paullatzelsperger
Copy link
Member Author

@ndr-brt my latest commit brings back the static HTML for the swagger UI website.

@github-actions
Copy link

This pull request is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale Open for x days with no activity label Dec 10, 2022
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 17e8bdf to 3ec284d Compare December 12, 2022 07:11
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 12, 2022 07:11 — with GitHub Actions Inactive
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 12, 2022 07:11 — with GitHub Actions Inactive
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 12, 2022 07:30 — with GitHub Actions Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 5ed4748 to 6d60eaf Compare December 12, 2022 07:34
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 12, 2022 07:35 — with GitHub Actions Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 6d60eaf to 38fd935 Compare December 12, 2022 07:42
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 12, 2022 07:44 — with GitHub Actions Inactive
@paullatzelsperger paullatzelsperger force-pushed the feature/2206_apply_apiGroup_and_adapt_ci branch from 38fd935 to 5ca2bdd Compare December 12, 2022 07:45
@paullatzelsperger paullatzelsperger temporarily deployed to Azure-dev December 12, 2022 07:48 — with GitHub Actions Inactive
@paullatzelsperger paullatzelsperger merged commit e120c6a into eclipse-edc:main Dec 12, 2022
Connector automation moved this from Review in progress to Done Dec 12, 2022
@paullatzelsperger paullatzelsperger deleted the feature/2206_apply_apiGroup_and_adapt_ci branch December 12, 2022 08:09
paullatzelsperger added a commit that referenced this pull request Dec 12, 2022
…es (#2209)

* feat: apply apiGroup configs

* delete embedded swagger UI

* bring back old and outdated Swagger UI

* updated api specs

* create-update logic for API doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Feature related to the (REST) api build Anything related to the CI/CD Pipeline on Github Actions documentation Improvements or additions to documentation stale Open for x days with no activity
Projects
No open projects
Connector
  
Done
3 participants