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

Document all API endpoints #271

Merged
merged 8 commits into from Jul 5, 2018

Conversation

Projects
None yet
6 participants
@interro
Copy link
Contributor

commented Jun 21, 2018

No description provided.

@interro interro requested review from donce, tadovas and Waldz as code owners Jun 21, 2018

// description: Creates identity and stores in keystore encrypted with passphrase
// parameters:
// - in: body
// name: body
// description: Parameters for creating new identity
// description: Parameter in body (passphrase) required for creating new identity

This comment has been minimized.

Copy link
@donce

donce Jun 25, 2018

Contributor

Do we need to specify "in body"? This is transport, we should not couple description to transport.

This comment has been minimized.

Copy link
@interro

interro Jun 27, 2018

Author Contributor

In swagger template this message looks more informative

This comment has been minimized.

Copy link
@Waldz

Waldz Jul 5, 2018

Member

yes we have, because doc describes payload body structure

@ignasbernotas
Copy link
Member

left a comment

LGTM

interro added some commits Jun 19, 2018

fmt

@interro interro dismissed stale reviews from ignasbernotas and donce via fcb426c Jun 27, 2018

@interro interro force-pushed the feature/MYST-557-api-doc-endpoints branch from 315ad70 to fcb426c Jun 27, 2018

func (ce *ConnectionEndpoint) Status(resp http.ResponseWriter, _ *http.Request, _ httprouter.Params) {
statusResponse := toStatusResponse(ce.manager.Status())
utils.WriteAsJSON(statusResponse, resp)
}

// Creates starts new connection

This comment has been minimized.

Copy link
@zolia

zolia Jul 2, 2018

Member

should be "Create", shouldn't it be caught by linter? Did you run it?

This comment has been minimized.

Copy link
@interro

interro Jul 2, 2018

Author Contributor

fixed, linter configured to have some tolerance

Version string `json:"version"`
BuildInfo buildInfo `json:"buildInfo"`
}

type buildInfo struct {
Commit string `json:"commit"`
Branch string `json:"branch"`
// example: <unknown>

This comment has been minimized.

Copy link
@zolia

zolia Jul 2, 2018

Member

Why this struct doesn't have "// swagger:model" heading?

This comment has been minimized.

Copy link
@interro

interro Jul 2, 2018

Author Contributor

added missing meta tags

@@ -41,7 +41,7 @@ MESSAGES_ERROR=`golint --set_exit_status --min_confidence=1 ${ARGUMENTS} 2>/dev/
MESSAGES_RECONFIGURE=()

check_uncleaned_package "github.com/mysterium/node/identity" 9
check_uncleaned_package "github.com/mysterium/node/tequilapi" 12
check_uncleaned_package "github.com/mysterium/node/tequilapi" 11

This comment has been minimized.

Copy link
@Waldz
@@ -56,6 +56,26 @@ type statusResponse struct {
SessionID string `json:"sessionId,omitempty"`
}

// swagger:model
type ipResponse struct {

This comment has been minimized.

Copy link
@Waldz

Waldz Jul 5, 2018

Member

Very strange that structures are private.
Lets make them public, because it is so.

interro added some commits Jul 5, 2018

@Waldz

Waldz approved these changes Jul 5, 2018

@tadovas

tadovas approved these changes Jul 5, 2018

Copy link
Member

left a comment

LGTM

@interro interro merged commit 1172078 into master Jul 5, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@interro interro deleted the feature/MYST-557-api-doc-endpoints branch Jul 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.