-
Notifications
You must be signed in to change notification settings - Fork 55
Add openAPI #47
Add openAPI #47
Changes from 8 commits
ebd69ef
c9d9a30
cde9e30
d318a22
7abfdba
5545586
30a87c0
c8ef4e0
2ffe7b0
d60d3c2
fb46f18
fa85e0f
f708c41
9393ad4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM golang:1.17-alpine AS build | ||
|
||
WORKDIR /app | ||
|
||
ENV SWAGGER_VERSION=v0.29.0 | ||
ENV REPO="github.com/go-swagger/go-swagger/cmd/swagger" | ||
|
||
COPY go.mod ./ | ||
COPY go.sum ./ | ||
RUN go mod download | ||
|
||
RUN go get -u "${REPO}@${SWAGGER_VERSION}" | ||
|
||
ENTRYPOINT ["swagger"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,17 @@ package main | |
import ( | ||
"context" | ||
"expvar" | ||
"github.com/ardanlabs/conf" | ||
"github.com/pkg/errors" | ||
"github.com/sirupsen/logrus" | ||
"github.com/tbd54566975/ssi-service/config" | ||
"github.com/tbd54566975/ssi-service/pkg/server" | ||
"net/http" | ||
"os" | ||
"os/signal" | ||
"syscall" | ||
"time" | ||
|
||
"github.com/ardanlabs/conf" | ||
"github.com/pkg/errors" | ||
"github.com/sirupsen/logrus" | ||
"github.com/tbd54566975/ssi-service/config" | ||
"github.com/tbd54566975/ssi-service/pkg/server" | ||
) | ||
|
||
const ( | ||
|
@@ -28,6 +29,19 @@ func init() { | |
logrus.SetOutput(os.Stdout) | ||
} | ||
|
||
// @title Swagger Example API | ||
// @version 1.0 | ||
// @description This is a sample server celler server. | ||
// @termsOfService http://swagger.io/terms/ | ||
|
||
// @contact.name API Support | ||
// @contact.url http://www.swagger.io/support | ||
// @contact.email [email protected] | ||
|
||
// @license.name Apache 2.0 | ||
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html | ||
|
||
// @host localhost:8080 | ||
func main() { | ||
logrus.Info("Starting up...") | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// TODO: read cryptosuite.LDKeyType from sdk properly | ||
skip github.com/TBD54566975/ssi-sdk/did.VerificationMethod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be solved before merge, what error did you run into? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @decentralgabe Seems cannot read LDKeyType which define inside ssi-sdk There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably need to fix the type definition in ssi-sdk.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let me take a look. do you mind if I push to the branch if I find a solution? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.