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

Draft: 7 add rest service to ingestor project #16

Closed
wants to merge 14 commits into from

Conversation

phwissmann
Copy link
Collaborator

No description provided.

* Add repo skeleton and desktop-app framework

Add wails.io based app with svelte frontend, a taskqueue and basic go module and package structure

* Follow standard go project structure

* Add CI workflow

* App: Don't fail when config is missing

* Add linting

* Fix defer

* Abstract progress notifier

Removes dependency of taskqueue on wails

* Move core package into separate folder
@phwissmann phwissmann linked an issue Sep 10, 2024 that may be closed by this pull request
@phwissmann phwissmann changed the title 7 add rest service to ingestor project Draft: 7 add rest service to ingestor project Sep 10, 2024
@phwissmann phwissmann linked an issue Sep 10, 2024 that may be closed by this pull request
1 task
@phwissmann phwissmann self-assigned this Sep 10, 2024
router.GET(options.BaseURL+"/version", wrapper.OtherControllerGetVersion)
}

// Base64 encoded, gzipped, json marshaled Swagger object
Copy link
Member

Choose a reason for hiding this comment

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

That's one way to do it. Weird that oapi-codegen embeds the schema instead of referencing the schema file directly.

Copy link
Collaborator Author

@phwissmann phwissmann Sep 10, 2024

Choose a reason for hiding this comment

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

¯\(ツ)

@sbliven
Copy link
Member

sbliven commented Sep 10, 2024

What are your first impressions? Do you foresee any issues with the oapi-codegen+gin stack after the initial setup?

The code smells like generated code, but otherwise looks fine to me at a first glance.

@phwissmann phwissmann force-pushed the 7-add-rest-service-to-ingestor-project branch from 1bc89c1 to c485052 Compare September 10, 2024 16:03
@phwissmann
Copy link
Collaborator Author

What are your first impressions? Do you foresee any issues with the oapi-codegen+gin stack after the initial setup?

The code smells like generated code, but otherwise looks fine to me at a first glance.

Generating code works fine, all the middleware (auth) can be configured. The only thing I struggled with was creating a Swagger UI test page (see latest commits)
image

This needs to be annotated manually which I find really odd given that we have openapi specs already. Either I'm doing it wrong or that's just the way it is.

References:
https://github.com/swaggo/gin-swagger

Create docs from function annoations to be served under /docs/index.html
@phwissmann phwissmann force-pushed the 7-add-rest-service-to-ingestor-project branch 2 times, most recently from 87a47b1 to 2e4fe76 Compare September 10, 2024 16:34
@phwissmann phwissmann force-pushed the 7-add-rest-service-to-ingestor-project branch from 2e4fe76 to 4a51612 Compare September 10, 2024 16:40
@phwissmann phwissmann force-pushed the 7-add-rest-service-to-ingestor-project branch from 795f91b to 893258c Compare September 12, 2024 06:53
@sbliven
Copy link
Member

sbliven commented Sep 16, 2024

@consolethinks Should we merge this?

This should be restricted more in the future (eg with a `--host` config
param to specify the frontend url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate Gin server from OpenAPI specs Add REST Service to Ingestor project
3 participants