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

gin swagger; remove streamlit #442

Merged
merged 16 commits into from
May 19, 2023
Merged

gin swagger; remove streamlit #442

merged 16 commits into from
May 19, 2023

Conversation

decentralgabe
Copy link
Member

@decentralgabe decentralgabe commented May 18, 2023

fixes #438

Cannot merge this until we figure out how to get a build user to push to main with updated swagger docs. See: https://github.com/orgs/community/discussions/25305

@@ -53,6 +52,12 @@ func run() error {
logrus.Fatalf("could not instantiate config: %s", err.Error())
}

// set up some additional swagger config
doc.SwaggerInfo.Version = cfg.SVN
Copy link
Member Author

Choose a reason for hiding this comment

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

adding the docs.go file is necessary to do this config

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2023

Codecov Report

Merging #442 (238d31c) into main (7047be5) will increase coverage by 0.00%.
The diff coverage is 25.00%.

❗ Current head 238d31c differs from pull request most recent head 355f640. Consider uploading reports for the commit 355f640 to get more accurate results

@@           Coverage Diff           @@
##             main     #442   +/-   ##
=======================================
  Coverage   21.39%   21.39%           
=======================================
  Files          48       49    +1     
  Lines        5366     5370    +4     
=======================================
+ Hits         1148     1149    +1     
- Misses       4034     4037    +3     
  Partials      184      184           
Impacted Files Coverage Δ
pkg/server/router/credential.go 3.92% <ø> (ø)
pkg/server/router/did.go 5.22% <ø> (ø)
pkg/server/router/health.go 0.00% <ø> (ø)
pkg/server/router/issuance.go 0.00% <ø> (ø)
pkg/server/router/keystore.go 11.26% <ø> (ø)
pkg/server/router/manifest.go 10.97% <ø> (ø)
pkg/server/router/operation.go 0.00% <ø> (ø)
pkg/server/router/presentation.go 3.73% <ø> (ø)
pkg/server/router/readiness.go 0.00% <ø> (ø)
pkg/server/router/schema.go 10.12% <ø> (ø)
... and 3 more

Copy link
Contributor

@andresuribe87 andresuribe87 left a comment

Choose a reason for hiding this comment

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

One minor nit to make this more robust.

- name: Update spec and push generated spec file
if: github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.merged != true
run: |
mage spec
Copy link
Contributor

Choose a reason for hiding this comment

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

mage spec is also doing formatting of files. See

ssi-service/magefile.go

Lines 114 to 117 in 7047be5

if err := sh.Run(swagCommand, "fmt", "-d", "pkg/server/router"); err != nil {
logrus.Fatal(err)
return err
}

I think that needs to be broken up into separate mage targets.

As it stands, you might get a passing CI during branch review, but failing in main because of this (a linter might fail).

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@decentralgabe decentralgabe merged commit 817610d into main May 19, 2023
@decentralgabe decentralgabe deleted the gin-swagger-438 branch May 19, 2023 19:22
decentralgabe pushed a commit that referenced this pull request May 20, 2023
* origin/main:
  gin swagger; remove streamlit (#442)

# Conflicts:
#	pkg/server/framework/server.go
#	pkg/server/router/did.go
#	pkg/server/router/health.go
#	pkg/server/router/readiness.go
#	pkg/server/server.go
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.

[Server] Use gin for serving swagger docs
3 participants