Skip to content

Commit

Permalink
fix: Generate CloudQuery Go API Client from spec.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cq-bot authored Sep 29, 2023
1 parent 8ef5639 commit 91ebfd8
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 52 deletions.
22 changes: 19 additions & 3 deletions client.gen.go

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

49 changes: 25 additions & 24 deletions models.gen.go

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

49 changes: 24 additions & 25 deletions spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
Expand All @@ -239,7 +242,7 @@
"plugins"
]
},
"put": {
"patch": {
"description": "Update a plugin",
"operationId": "UpdatePlugin",
"tags": [
Expand Down Expand Up @@ -282,6 +285,9 @@
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
Expand Down Expand Up @@ -397,7 +403,7 @@
},
"/plugins/{team_name}/{plugin_kind}/{plugin_name}/versions/{version_name}": {
"get": {
"description": "Get details about a given plugin version. Use `latest` as version to get the latest version.",
"description": "Get details about a given plugin version.",
"operationId": "GetPluginVersion",
"parameters": [
{
Expand Down Expand Up @@ -1402,7 +1408,7 @@
"$ref": "#/components/parameters/per_page"
},
{
"$ref": "#/components/parameters/include_unlisted"
"$ref": "#/components/parameters/include_private"
}
],
"responses": {
Expand Down Expand Up @@ -2317,8 +2323,8 @@
"tier": {
"$ref": "#/components/schemas/PluginTier"
},
"listed": {
"description": "True if the plugin is publicly listed, false otherwise",
"public": {
"description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the plugin's team.",
"type": "boolean"
}
},
Expand Down Expand Up @@ -2357,7 +2363,8 @@
"tier",
"display_name",
"short_description",
"logo"
"logo",
"public"
],
"properties": {
"team_name": {
Expand Down Expand Up @@ -2397,11 +2404,10 @@
"type": "string",
"example": "https://github.com/cloudquery/cloudquery"
},
"source": {
"type": "boolean"
},
"destination": {
"type": "boolean"
"public": {
"type": "boolean",
"description": "Whether the plugin is listed in the CloudQuery Hub. If false, the plugin will not be shown in the CloudQuery Hub and will only be visible to members of the team.",
"example": true
},
"logo": {
"type": "string",
Expand Down Expand Up @@ -2436,13 +2442,6 @@
},
"PluginUpdate": {
"type": "object",
"required": [
"category",
"tier",
"display_name",
"short_description",
"logo"
],
"properties": {
"category": {
"$ref": "#/components/schemas/PluginCategory"
Expand Down Expand Up @@ -2477,9 +2476,9 @@
"description": "URL to the plugin's logo. This will be shown in the CloudQuery Hub. This must point to https://images.cloudquery.io/...",
"example": "https://images.cloudquery.io/logos/aws.png"
},
"listed": {
"public": {
"type": "boolean",
"description": "If plugin is not listed, it won't be visible or accessible in the registry."
"description": "If plugin is not public, it won't be visible to other teams in the CloudQuery Hub."
}
}
},
Expand Down Expand Up @@ -2529,7 +2528,7 @@
},
"retracted": {
"type": "boolean",
"description": "If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version."
"description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use."
},
"protocols": {
"type": "array",
Expand Down Expand Up @@ -2587,7 +2586,7 @@
},
"retracted": {
"type": "boolean",
"description": "If a plugin version is retracted, assets will still be available for download, but will not be counted as the latest version."
"description": "If a plugin version is retracted, assets will still be available for download, but the version will be marked as retracted to discourage use."
},
"protocols": {
"type": "array",
Expand Down Expand Up @@ -3210,10 +3209,10 @@
"type": "string"
}
},
"include_unlisted": {
"description": "Whether to include unlisted plugins",
"include_private": {
"description": "Whether to include private plugins",
"in": "query",
"name": "include_unlisted",
"name": "include_private",
"required": false,
"schema": {
"type": "boolean"
Expand Down

0 comments on commit 91ebfd8

Please sign in to comment.