Skip to content

Commit

Permalink
fix: openapi spec and internal SDK (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik authored Jan 21, 2022
1 parent 169d63e commit a1b20c7
Show file tree
Hide file tree
Showing 9 changed files with 323 additions and 9 deletions.
10 changes: 5 additions & 5 deletions internal/e2e/sdk_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (c *sdkClient) getWriteClient() *httpclient.OryKeto {

func (c *sdkClient) createTuple(t require.TestingT, r *relationtuple.InternalRelationTuple) {
payload := &models.RelationQuery{
Namespace: &r.Namespace,
Namespace: r.Namespace,
Object: r.Object,
Relation: r.Relation,
}
Expand All @@ -76,7 +76,7 @@ func (c *sdkClient) createTuple(t require.TestingT, r *relationtuple.InternalRel
}

func (c *sdkClient) deleteTuple(t require.TestingT, r *relationtuple.InternalRelationTuple) {
params := write.NewDeleteRelationTupleParamsWithTimeout(time.Second).
params := write.NewDeleteRelationTuplesParamsWithTimeout(time.Second).
WithNamespace(&r.Namespace).
WithObject(&r.Object).
WithRelation(&r.Relation)
Expand All @@ -90,12 +90,12 @@ func (c *sdkClient) deleteTuple(t require.TestingT, r *relationtuple.InternalRel
WithSubjectSetRelation(&s.Relation)
}

_, err := c.getWriteClient().Write.DeleteRelationTuple(params)
_, err := c.getWriteClient().Write.DeleteRelationTuples(params)
require.NoError(t, err)
}

func (c *sdkClient) deleteAllTuples(t require.TestingT, q *relationtuple.RelationQuery) {
params := write.NewDeleteRelationTupleParamsWithTimeout(time.Second).
params := write.NewDeleteRelationTuplesParamsWithTimeout(time.Second).
WithNamespace(&q.Namespace).
WithObject(&q.Object).
WithRelation(&q.Relation)
Expand All @@ -112,7 +112,7 @@ func (c *sdkClient) deleteAllTuples(t require.TestingT, q *relationtuple.Relatio
}
}

_, err := c.getWriteClient().Write.DeleteRelationTuple(params)
_, err := c.getWriteClient().Write.DeleteRelationTuples(params)
require.NoError(t, err)
}

Expand Down
239 changes: 239 additions & 0 deletions internal/httpclient/client/write/delete_relation_tuples_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion internal/httpclient/models/expand_tree.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions internal/httpclient/models/get_relation_tuples_response.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions internal/httpclient/models/internal_relation_tuple.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a1b20c7

Please sign in to comment.