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

fix: Generate CloudQuery Go API Client from spec.json #88

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions client.gen.go

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

23 changes: 23 additions & 0 deletions models.gen.go

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

99 changes: 99 additions & 0 deletions spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2848,6 +2848,64 @@
]
}
},
"/teams/{team_name}/invoices": {
"get": {
"description": "List all past invoices for the team.",
"operationId": "ListInvoicesByTeam",
"parameters": [
{
"$ref": "#/components/parameters/team_name"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per_page"
}
],
"responses": {
"200": {
"description": "Response",
"content": {
"application/json": {
"schema": {
"required": [
"items",
"metadata"
],
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/Invoice"
},
"type": "array"
},
"metadata": {
"$ref": "#/components/schemas/ListMetadata"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/RequiresAuthentication"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalError"
}
},
"tags": [
"teams"
]
}
},
"/teams/{team_name}/usage": {
"get": {
"description": "List plugin usage for the current calendar month.",
Expand Down Expand Up @@ -5414,6 +5472,47 @@
}
}
},
"Invoice": {
"additionalProperties": false,
"title": "Invoice",
"description": "Invoice details",
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"example": "2017-07-14T16:53:42Z"
},
"amount_due": {
"type": "integer",
"format": "int64",
"example": 1000,
"description": "Amount due in cents. This is the amount that will be charged, unless there are pending invoice items. If the invoice’s total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. The charge that gets generated for the invoice will be for the amount specified in amount_due."
},
"currency": {
"type": "string",
"example": "usd"
},
"invoice_pdf": {
"type": "string",
"format": "uri",
"description": "The link to download the PDF for the invoice.",
"x-go-name": "InvoicePDF"
},
"paid": {
"type": "boolean",
"example": true,
"description": "Whether or not payment was successfully collected for this invoice."
}
},
"required": [
"created_at",
"amount_due",
"currency",
"invoice_pdf",
"paid"
],
"type": "object"
},
"UsageCurrent": {
"title": "CloudQuery Plugin Usage",
"description": "The usage of a plugin within the current calendar month.",
Expand Down