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

chore: move SDK naming to v1 #1138

Merged
merged 5 commits into from
Nov 25, 2022
Merged

chore: move SDK naming to v1 #1138

merged 5 commits into from
Nov 25, 2022

Conversation

hperl
Copy link
Collaborator

@hperl hperl commented Nov 18, 2022

This adapts the https://intranet.ory.sh/docs/dev/api-guidelines/ to Keto to bring the SDK to v1.

BREAKING CHANGES: This changes the naming in the OpenAPI-generated SDKs. The REST and gRPC APIs are unchanged, so old OpenAPI clients still work (and gRPC clients are completely unaffected).

Related issue(s)

Fixes https://github.com/ory-corp/cloud/issues/3404

Checklist

  • Rename models, params
  • Check all comments

@hperl hperl requested a review from zepatrik as a code owner November 18, 2022 12:39
@hperl hperl requested a review from aeneasr November 18, 2022 12:39
@hperl hperl self-assigned this Nov 18, 2022
@hperl hperl marked this pull request as draft November 18, 2022 12:46
@hperl hperl marked this pull request as ready for review November 18, 2022 12:58
internal/check/handler.go Outdated Show resolved Hide resolved
internal/namespace/namespacehandler/handler.go Outdated Show resolved Hide resolved
internal/relationtuple/swagger_definitions.go Outdated Show resolved Hide resolved
internal/relationtuple/swagger_definitions.go Outdated Show resolved Hide resolved
@aeneasr
Copy link
Member

aeneasr commented Nov 22, 2022

A few more to dos:

  • Please rename genericError to errorGeneric
  • Please rename "#/components/schemas/patchDelta" to "#/components/schemas/relationshipPatch"
  • In createRelationships rename the request body parameter from "#/components/schemas/relationQuery" to "#/components/schemas/createRelationshipsBody"
  • createRelationships returns a type called "#/components/schemas/relationQuery". Shouldn't this return a relationship?
  • getRelationshipNamespaces returns a model called "#/components/schemas/getRelationshipNamespacesResponse" but it should be named something along the lines of relationshipNamespaces, see examples for naming: https://intranet.ory.sh/docs/dev/api-guidelines/#exemplary-definitions . We generally want to prevent using response or request in swagger names, because openapi generators add those automatically, and we end up with getRelationshipNamespacesResponseResponse

Personal tip: check the resulting openapi.json file for inconsistencies :) And compare it with one from e.g. kratos or hydra.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

@aeneasr
Copy link
Member

aeneasr commented Nov 24, 2022

@hperl can you PTAL into the failing tests and what's required to get this merged? TY

@hperl hperl requested a review from aeneasr November 25, 2022 09:42
@aeneasr aeneasr merged commit ffc3ab7 into master Nov 25, 2022
@aeneasr aeneasr deleted the hperl/keto-v1-sdk branch November 25, 2022 10:09
@aeneasr
Copy link
Member

aeneasr commented Nov 25, 2022

@hperl please add an upgrade guide to: https://www.ory.sh/docs/guides/upgrade/sdk-v1

@hperl
Copy link
Collaborator Author

hperl commented Nov 25, 2022

@hperl please add an upgrade guide to: https://www.ory.sh/docs/guides/upgrade/sdk-v1

see ory/docs#1101

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

3 participants