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

fix(docs): Autogenerate Swagger docs [DEV-1839] #57

Merged
merged 43 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
82a6aec
docs: Add swagger docs
Toktar Oct 18, 2022
0750d08
docs: Update swagger docs
Toktar Oct 18, 2022
5e5480c
Merge branch 'main' of github.com:cheqd/did-resolver into swagger
Toktar Oct 18, 2022
84f9d8c
Update dependencies
Toktar Oct 18, 2022
22e8834
Linter fixes
Toktar Oct 19, 2022
ba0818b
Extend Resolver functionality
Toktar Oct 21, 2022
9cc04e2
Merge branch 'main' into swagger
ankurdotb Dec 2, 2022
cbaa541
go mod tidy
ankurdotb Dec 2, 2022
e4c9c43
gofumpt -l -w .
ankurdotb Dec 2, 2022
2fe76ff
fix: Remove swagger files
DaevMithran Dec 2, 2022
ce35f07
feat: Add linted swagger docs
DaevMithran Dec 2, 2022
d0fbfbb
build: Upgrade pytest
DaevMithran Dec 5, 2022
331028d
Update basics
ankurdotb Dec 5, 2022
cf6cd56
go mod tidy
ankurdotb Dec 5, 2022
ecc7061
Update diddoc_service.go
ankurdotb Dec 5, 2022
beecfc6
Rename splitDID
ankurdotb Dec 5, 2022
eb02f00
Update base details
ankurdotb Dec 5, 2022
b80bdc3
Update base details
ankurdotb Dec 5, 2022
f632b3d
Change base details
ankurdotb Dec 5, 2022
88789bb
Fix examples in DID APIs
ankurdotb Dec 5, 2022
34e7368
Resource-specific metadata
ankurdotb Dec 5, 2022
26054eb
Fetch specific resource
ankurdotb Dec 5, 2022
b239510
Fetch all resource metadata
ankurdotb Dec 5, 2022
2336849
Update all Swagger docs
ankurdotb Dec 5, 2022
023ffc0
Define dereferencing examples
ankurdotb Dec 5, 2022
9f3fa98
Update DIDDoc metadata examples
ankurdotb Dec 5, 2022
cbe87a8
Update DIDDoc examples
ankurdotb Dec 5, 2022
b9a71a8
Update resolution_metadata.go
ankurdotb Dec 5, 2022
a0f68d8
Update diddoc_service.go
ankurdotb Dec 5, 2022
7834fa7
Set API version
ankurdotb Dec 5, 2022
56e3674
swag fmt
ankurdotb Dec 5, 2022
3bce557
Add service examples
ankurdotb Dec 5, 2022
4c80055
Move DID Resolution annotation to ledger_service
ankurdotb Dec 5, 2022
7e2c009
Update constants
ankurdotb Dec 5, 2022
50b01f4
swag fmt all docs after moving
ankurdotb Dec 5, 2022
8fd1d6c
Remove unused examples
ankurdotb Dec 5, 2022
48362a7
swag init
ankurdotb Dec 5, 2022
7fd74fc
Correct swag error
ankurdotb Dec 5, 2022
9a451b6
PR format check
ankurdotb Dec 5, 2022
d15d9ce
go mod tidy
ankurdotb Dec 5, 2022
b26403e
Update doc formatting error
ankurdotb Dec 5, 2022
869f78a
Update package-lock.json
ankurdotb Dec 5, 2022
0302096
Bump alpine version
ankurdotb Dec 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- develop
- release/**
types:
- opened
- reopened
Expand All @@ -19,15 +20,29 @@ jobs:
lint-pr:
name: "PR format check"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
# check for the most recent release: https://github.com/CondeNast/conventional-pull-request-action/releases
# replace vX.X.X below with the most recently released version
- uses: CondeNast/conventional-pull-request-action@v0.1.2

- uses: amannn/action-semantic-pull-request@v5.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# to override config-conventional rules, specify a relative path to your rules module, actions/checkout is required for this setting!
commitlintRulesPath: "./.github/linters/.commitlint.rules.js" # default: undefined
# if the PR contains a single commit, fail if the commit message and the PR title do not match
commitTitleMatch: false # default: 'true'
# Configure which types are allowed (newline delimited).
# Default: https://github.com/commitizen/conventional-commit-types
types: |
feat
fix
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
# Configure that a scope must always be provided.
requireScope: false
2 changes: 2 additions & 0 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
echoSwagger "github.com/swaggo/echo-swagger"
)

func getServeCmd() *cobra.Command {
Expand Down Expand Up @@ -61,6 +62,7 @@ func serve() {
requestService := services.NewRequestService(types.DID_METHOD, ledgerService)

// Routes
e.GET(types.SWAGGER_PATH, echoSwagger.WrapHandler)
e.GET(types.RESOLVER_PATH+":did", requestService.ResolveDIDDoc)
e.GET(types.RESOLVER_PATH+":did"+types.RESOURCE_PATH+":resource", requestService.DereferenceResourceData)
e.GET(types.RESOLVER_PATH+":did"+types.RESOURCE_PATH+":resource/metadata", requestService.DereferenceResourceMetadata)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN go mod download && go build -o did-resolver main.go
### STAGE 2: Build cheqd did-resolver container image ###
#####################################################################

FROM alpine:3.16 AS resolver
FROM alpine:3.17 AS resolver

# Install pre-requisites
RUN apk update && apk add --no-cache bash ca-certificates
Expand Down
Loading