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
Merged

Conversation

interro
Copy link
Contributor

@interro interro commented Jun 21, 2018

No description provided.

donce
donce previously approved these changes Jun 25, 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
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In swagger template this message looks more informative

Copy link
Member

Choose a reason for hiding this comment

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

yes we have, because doc describes payload body structure

ignasbernotas
ignasbernotas previously approved these changes Jun 26, 2018
Copy link
Contributor

@ignasbernotas ignasbernotas left a comment

Choose a reason for hiding this comment

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

LGTM

@interro interro dismissed stale reviews from ignasbernotas and donce via fcb426c June 27, 2018 11:45
@interro interro force-pushed the feature/MYST-557-api-doc-endpoints branch from 315ad70 to fcb426c Compare June 27, 2018 11:45
donce
donce previously approved these changes Jun 28, 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
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

+1

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

// swagger:model
type ipResponse struct {
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@tadovas tadovas left a comment

Choose a reason for hiding this comment

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

LGTM

@interro interro merged commit 1172078 into master Jul 5, 2018
@interro interro deleted the feature/MYST-557-api-doc-endpoints branch July 5, 2018 14:39
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.

None yet

6 participants