Skip to content

Commit d9bbd93

Browse files
Update api spec (#157)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 993a36f commit d9bbd93

File tree

5 files changed

+746
-448
lines changed

5 files changed

+746
-448
lines changed

examples_test.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kittycad.go.patch.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,14 @@
311311
"op": "add",
312312
"path": "/paths/~1oauth2~1provider~1{provider}~1consent/get/x-go"
313313
},
314+
{
315+
"value": {
316+
"example": "// TokenRevoke: Revoke an OAuth2 token.\n// \n// This endpoint is designed to be accessed from an *unauthenticated* API client.\n// \n// \n// Parameters\n// \n// \t- `body`: The request parameters for the OAuth 2.0 token revocation flow.\n// \n// TokenRevoke: Revoke an OAuth2 token.\n// This endpoint is designed to be accessed from an *unauthenticated* API client.\n//\n// Parameters\n//\n// - `body`: The request parameters for the OAuth 2.0 token revocation flow.\nfunc ExampleOauth2Service_TokenRevoke() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Oauth2.TokenRevoke(kittycad.TokenRevokeRequestForm{ClientID: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), ClientSecret: \"some-string\", Token: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
317+
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#Oauth2Service.TokenRevoke"
318+
},
319+
"op": "add",
320+
"path": "/paths/~1oauth2~1token~1revoke/post/x-go"
321+
},
314322
{
315323
"value": {
316324
"example": "// Delete: Delete an org.\n// \n// In order to delete an org, you must first delete all of its members, except yourself.\n// You must also have no outstanding invoices or unpaid balances.\n// This endpoint requires authentication by an org admin. It deletes the authenticated user's org.\n// \n// Delete: Delete an org.\n// In order to delete an org, you must first delete all of its members, except yourself.\n// You must also have no outstanding invoices or unpaid balances.\n// This endpoint requires authentication by an org admin. It deletes the authenticated user's org.\nfunc ExampleOrgService_Delete() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Org.Delete(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",

paths.go

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec.json

Lines changed: 203 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4507,6 +4507,98 @@
45074507
}
45084508
}
45094509
},
4510+
"/oauth2/token/revoke": {
4511+
"post": {
4512+
"tags": [
4513+
"oauth2",
4514+
"hidden"
4515+
],
4516+
"summary": "Revoke an OAuth2 token.",
4517+
"description": "This endpoint is designed to be accessed from an *unauthenticated* API client.",
4518+
"operationId": "oauth2_token_revoke",
4519+
"requestBody": {
4520+
"content": {
4521+
"application/x-www-form-urlencoded": {
4522+
"schema": {
4523+
"$ref": "#/components/schemas/TokenRevokeRequestForm"
4524+
}
4525+
}
4526+
},
4527+
"required": true
4528+
},
4529+
"responses": {
4530+
"default": {
4531+
"description": "",
4532+
"content": {
4533+
"*/*": {
4534+
"schema": {}
4535+
}
4536+
}
4537+
}
4538+
}
4539+
},
4540+
"options": {
4541+
"tags": [
4542+
"hidden"
4543+
],
4544+
"summary": "OPTIONS endpoint.",
4545+
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
4546+
"operationId": "options_oauth2_token_revoke",
4547+
"responses": {
4548+
"204": {
4549+
"description": "successful operation, no content",
4550+
"headers": {
4551+
"Access-Control-Allow-Credentials": {
4552+
"description": "Access-Control-Allow-Credentials header.",
4553+
"style": "simple",
4554+
"required": true,
4555+
"schema": {
4556+
"type": "string"
4557+
}
4558+
},
4559+
"Access-Control-Allow-Headers": {
4560+
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
4561+
"style": "simple",
4562+
"required": true,
4563+
"schema": {
4564+
"type": "string"
4565+
}
4566+
},
4567+
"Access-Control-Allow-Methods": {
4568+
"description": "Access-Control-Allow-Methods header.",
4569+
"style": "simple",
4570+
"required": true,
4571+
"schema": {
4572+
"type": "string"
4573+
}
4574+
},
4575+
"Access-Control-Allow-Origin": {
4576+
"description": "Access-Control-Allow-Origin header.",
4577+
"style": "simple",
4578+
"required": true,
4579+
"schema": {
4580+
"type": "string"
4581+
}
4582+
},
4583+
"X-Api-Call-Id": {
4584+
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
4585+
"style": "simple",
4586+
"required": true,
4587+
"schema": {
4588+
"type": "string"
4589+
}
4590+
}
4591+
}
4592+
},
4593+
"4XX": {
4594+
"$ref": "#/components/responses/Error"
4595+
},
4596+
"5XX": {
4597+
"$ref": "#/components/responses/Error"
4598+
}
4599+
}
4600+
}
4601+
},
45104602
"/org": {
45114603
"get": {
45124604
"tags": [
@@ -19845,6 +19937,20 @@
1984519937
}
1984619938
}
1984719939
},
19940+
"Loft": {
19941+
"description": "The response from the `Loft` command.",
19942+
"type": "object",
19943+
"properties": {
19944+
"solid_id": {
19945+
"description": "The UUID of the newly created solid loft.",
19946+
"type": "string",
19947+
"format": "uuid"
19948+
}
19949+
},
19950+
"required": [
19951+
"solid_id"
19952+
]
19953+
},
1984819954
"Mass": {
1984919955
"description": "The mass response.",
1985019956
"type": "object",
@@ -20579,7 +20685,7 @@
2057920685
]
2058020686
},
2058120687
{
20582-
"description": "Command for revolving a solid 2d.",
20688+
"description": "Command for shelling a solid3d face",
2058320689
"type": "object",
2058420690
"properties": {
2058520691
"face_ids": {
@@ -20670,6 +20776,58 @@
2067020776
"type"
2067120777
]
2067220778
},
20779+
{
20780+
"description": "Command for lofting sections to create a solid",
20781+
"type": "object",
20782+
"properties": {
20783+
"base_curve_index": {
20784+
"nullable": true,
20785+
"description": "This can be set to override the automatically determined topological base curve, which is usually the first section encountered.",
20786+
"type": "integer",
20787+
"format": "uint32",
20788+
"minimum": 0
20789+
},
20790+
"bez_approximate_rational": {
20791+
"description": "Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary.",
20792+
"type": "boolean"
20793+
},
20794+
"section_ids": {
20795+
"description": "The closed section curves to create a lofted solid from. Currently, these must be Solid2Ds",
20796+
"type": "array",
20797+
"items": {
20798+
"type": "string",
20799+
"format": "uuid"
20800+
}
20801+
},
20802+
"tolerance": {
20803+
"description": "Tolerance",
20804+
"allOf": [
20805+
{
20806+
"$ref": "#/components/schemas/LengthUnit"
20807+
}
20808+
]
20809+
},
20810+
"type": {
20811+
"type": "string",
20812+
"enum": [
20813+
"loft"
20814+
]
20815+
},
20816+
"v_degree": {
20817+
"description": "Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction.",
20818+
"type": "integer",
20819+
"format": "uint32",
20820+
"minimum": 1
20821+
}
20822+
},
20823+
"required": [
20824+
"bez_approximate_rational",
20825+
"section_ids",
20826+
"tolerance",
20827+
"type",
20828+
"v_degree"
20829+
]
20830+
},
2067320831
{
2067420832
"description": "Closes a path, converting it to a 2D solid.",
2067520833
"type": "object",
@@ -23742,6 +23900,25 @@
2374223900
"type"
2374323901
]
2374423902
},
23903+
{
23904+
"description": "The response to the 'Loft' endpoint",
23905+
"type": "object",
23906+
"properties": {
23907+
"data": {
23908+
"$ref": "#/components/schemas/Loft"
23909+
},
23910+
"type": {
23911+
"type": "string",
23912+
"enum": [
23913+
"loft"
23914+
]
23915+
}
23916+
},
23917+
"required": [
23918+
"data",
23919+
"type"
23920+
]
23921+
},
2374523922
{
2374623923
"description": "The response to the 'ClosePath' endpoint",
2374723924
"type": "object",
@@ -27417,6 +27594,31 @@
2741727594
"items"
2741827595
]
2741927596
},
27597+
"TokenRevokeRequestForm": {
27598+
"description": "The request parameters for the OAuth 2.0 token revocation flow.",
27599+
"type": "object",
27600+
"properties": {
27601+
"client_id": {
27602+
"description": "The client ID.",
27603+
"type": "string",
27604+
"format": "uuid"
27605+
},
27606+
"client_secret": {
27607+
"nullable": true,
27608+
"description": "The client secret.",
27609+
"type": "string"
27610+
},
27611+
"token": {
27612+
"description": "The token to revoke.",
27613+
"type": "string",
27614+
"format": "uuid"
27615+
}
27616+
},
27617+
"required": [
27618+
"client_id",
27619+
"token"
27620+
]
27621+
},
2742027622
"UnitAngle": {
2742127623
"description": "The valid types of angle formats.",
2742227624
"oneOf": [

0 commit comments

Comments
 (0)