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

Convert server keys to swagger #1405

Merged
merged 5 commits into from
Jul 18, 2018

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Jul 11, 2018

A later PR will improve the section. The goal here is to convert the code block to swagger.

Rendered: https://matrix.org/speculator/spec/1405/server_server/unstable.html#version-2

@turt2live
Copy link
Member Author

Note: This PR is intended to convert the existing documentation as-is to swagger. #1423 actually goes through to improve the documentation. This is to hopefully create a useful diff for the swagger files.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

apart from the nits, awesomeness!

properties:
server_name:
type: string
description: DNS name of the homeserver
Copy link
Member

Choose a reason for hiding this comment

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

type: integer
format: int64
description: Minimum Valid Until Milliseconds
required: true # TODO: Verify
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not, but the existing documentation says it is. The 'fix' is in #1423

paths:
"/query/{serverName}/{keyId}":
get:
summary: Retreive a server key
Copy link
Member

Choose a reason for hiding this comment

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

retrieve

"/query/{serverName}/{keyId}":
get:
summary: Retreive a server key
description: Retreive a server key
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Member

Choose a reason for hiding this comment

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

[also as per https://github.com/matrix-org/matrix-doc/blob/master/meta/documentation_style.rst#openapi this is meant to be a long-form description; however I'm happy if you want to punt that for now]

Copy link
Member Author

Choose a reason for hiding this comment

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

The longer form descriptions are punted to a later PR which actually attempts to improve the documentation. The plan is to convert things to swagger then improve to make the diff a little bit more clear.

$ref: "definitions/keys_query_response.yaml"
"/query":
post:
summary: Retreive a server key
Copy link
Member

Choose a reason for hiding this comment

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

retrieve

"/query":
post:
summary: Retreive a server key
description: Retreive a server key
Copy link
Member

Choose a reason for hiding this comment

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

ditto

get:
summary: Retreive a server key
description: Retreive a server key
operationId: getQueryKeys
Copy link
Member

Choose a reason for hiding this comment

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

this is a bit of a funny name for it.

Maybe perspectivesKeyQuery and bulkPerspectivesKeyQuery ?

@richvdh richvdh assigned turt2live and unassigned richvdh Jul 18, 2018
@turt2live turt2live assigned richvdh and unassigned turt2live Jul 18, 2018
@turt2live
Copy link
Member Author

Please take another look @richvdh.

#1423 is the PR that aims to actually improve the section/text to accurately represent what the real world is. This PR is more for converting the stuff to swagger to make #1423 diff less obstructive.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm

@turt2live turt2live merged commit a84a9a6 into matrix-org:master Jul 18, 2018
@turt2live turt2live deleted the travis/s2s/keys-swagger branch July 18, 2018 18:48
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

2 participants