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: API-first approach for REST interface #1129

Merged
merged 4 commits into from Sep 9, 2023
Merged

feat: API-first approach for REST interface #1129

merged 4 commits into from Sep 9, 2023

Conversation

0xERR0R
Copy link
Owner

@0xERR0R 0xERR0R commented Sep 7, 2023

Motivation and detailed description: see #808

short summary:

  • API specification with OpenAPI standard (yaml file under docs/api)
  • We generate server stub and REST client from this OpenAPI file
  • Implementation of server stub
  • CLI commands use generated REST client
  • OpenAPI and RapiDoc UI are embedded in final binary and are accessible from index.html
  • Documentation (GitHub pages) provides OpenAPI and RapiDoc

closes #808

@0xERR0R 0xERR0R added 📙 documentation Improvements or additions to documentation 🔨 enhancement New feature or request labels Sep 7, 2023
@0xERR0R 0xERR0R added this to the v0.23 milestone Sep 7, 2023
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage is 81.53% of modified lines.

Files Changed Coverage
resolver/blocking_resolver.go 12.50%
server/server.go 45.45%
server/server_endpoints.go 77.96%
cmd/blocking.go 78.37%
cmd/lists.go 87.50%
api/api_interface_impl.go 92.64%
cmd/query.go 93.33%
cmd/root.go 100.00%
lists/list_cache.go 100.00%
resolver/resolver.go 100.00%

📢 Thoughts on this report? Let us know!.

@0xERR0R 0xERR0R changed the title Openapi rest feat: API-first approach for REST interface Sep 7, 2023
Copy link
Collaborator

@kwitsch kwitsch left a comment

Choose a reason for hiding this comment

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

This declutters the API implementation quite a bit. I like it. 👍

Read through it and couldn't find a flaw so far.

Sadly I'm currently still unable to test it locally. 😓

@0xERR0R
Copy link
Owner Author

0xERR0R commented Sep 9, 2023

Sadly I'm currently still unable to test it locally. 😓

No local dev environment installed? I used recently github codespaces and it works great. You need only a browser.

@0xERR0R 0xERR0R merged commit 72d747c into main Sep 9, 2023
2 of 3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the openapi-rest branch September 9, 2023 17:30
@kwitsch
Copy link
Collaborator

kwitsch commented Sep 9, 2023

Sadly I'm currently still unable to test it locally. 😓

No local dev environment installed? I used recently github codespaces and it works great. You need only a browser.

No free time to sit behind my computer.
I'm writing and reading mostly with my mobile phone on a construction site or while riding train.
Should get better in two or three weeks since construction is nearly complete and most business trips are done (getting a promotion at work could have it's downsides😅).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📙 documentation Improvements or additions to documentation 🔨 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API-first approach for REST interface
2 participants