Skip to content

Commit

Permalink
FI=ix swagger generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jamlo committed Jan 16, 2025
1 parent dda3693 commit 1d3b71d
Show file tree
Hide file tree
Showing 3 changed files with 402 additions and 1 deletion.
137 changes: 136 additions & 1 deletion pkg/swagger/docs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by swaggo/swag. DO NOT EDIT
// Package swagger Code generated by swaggo/swag. DO NOT EDIT
package swagger

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -113,6 +113,38 @@ const docTemplate = `{
}
}
},
"/api/v1/agent/license": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Ops"
],
"summary": "Returns the details of the current configured orchestrator license.",
"operationId": "agent/license",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/license.LicenseClaims"
}
},
"404": {
"description": "Node license not configured",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/agent/node": {
"get": {
"produces": [
Expand Down Expand Up @@ -1184,6 +1216,90 @@ const docTemplate = `{
}
}
},
"jwt.NumericDate": {
"type": "object",
"properties": {
"time.Time": {
"type": "string"
}
}
},
"license.LicenseClaims": {
"type": "object",
"properties": {
"aud": {
"description": "the ` + "`" + `aud` + "`" + ` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3",
"type": "array",
"items": {
"type": "string"
}
},
"capabilities": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"customer_id": {
"type": "string"
},
"exp": {
"description": "the ` + "`" + `exp` + "`" + ` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4",
"allOf": [
{
"$ref": "#/definitions/jwt.NumericDate"
}
]
},
"iat": {
"description": "the ` + "`" + `iat` + "`" + ` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6",
"allOf": [
{
"$ref": "#/definitions/jwt.NumericDate"
}
]
},
"iss": {
"description": "the ` + "`" + `iss` + "`" + ` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1",
"type": "string"
},
"jti": {
"description": "the ` + "`" + `jti` + "`" + ` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7",
"type": "string"
},
"license_id": {
"type": "string"
},
"license_type": {
"type": "string"
},
"license_version": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"nbf": {
"description": "the ` + "`" + `nbf` + "`" + ` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5",
"allOf": [
{
"$ref": "#/definitions/jwt.NumericDate"
}
]
},
"product": {
"description": "Add your custom license claims here",
"type": "string"
},
"sub": {
"description": "the ` + "`" + `sub` + "`" + ` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2",
"type": "string"
}
}
},
"models.AllocatedResources": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2672,6 +2788,15 @@ const docTemplate = `{
}
}
},
"types.License": {
"type": "object",
"properties": {
"LocalPath": {
"description": "LocalPath specifies the local license file path",
"type": "string"
}
}
},
"types.LocalPublisher": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2764,6 +2889,14 @@ const docTemplate = `{
"description": "Host specifies the hostname or IP address on which the Orchestrator server listens for compute node connections.",
"type": "string"
},
"License": {
"description": "License specifies license configuration for orchestrator node",
"allOf": [
{
"$ref": "#/definitions/types.License"
}
]
},
"NodeManager": {
"$ref": "#/definitions/types.NodeManager"
},
Expand Down Expand Up @@ -3042,6 +3175,8 @@ var SwaggerInfo = &swag.Spec{
Description: "This page is the reference of the Bacalhau REST API. Project docs are available at https://docs.bacalhau.org/. Find more information about Bacalhau at https://github.com/bacalhau-project/bacalhau.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}

func init() {
Expand Down
133 changes: 133 additions & 0 deletions pkg/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,38 @@
}
}
},
"/api/v1/agent/license": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Ops"
],
"summary": "Returns the details of the current configured orchestrator license.",
"operationId": "agent/license",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/license.LicenseClaims"
}
},
"404": {
"description": "Node license not configured",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/api/v1/agent/node": {
"get": {
"produces": [
Expand Down Expand Up @@ -1180,6 +1212,90 @@
}
}
},
"jwt.NumericDate": {
"type": "object",
"properties": {
"time.Time": {
"type": "string"
}
}
},
"license.LicenseClaims": {
"type": "object",
"properties": {
"aud": {
"description": "the `aud` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3",
"type": "array",
"items": {
"type": "string"
}
},
"capabilities": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"customer_id": {
"type": "string"
},
"exp": {
"description": "the `exp` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4",
"allOf": [
{
"$ref": "#/definitions/jwt.NumericDate"
}
]
},
"iat": {
"description": "the `iat` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6",
"allOf": [
{
"$ref": "#/definitions/jwt.NumericDate"
}
]
},
"iss": {
"description": "the `iss` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1",
"type": "string"
},
"jti": {
"description": "the `jti` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7",
"type": "string"
},
"license_id": {
"type": "string"
},
"license_type": {
"type": "string"
},
"license_version": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"nbf": {
"description": "the `nbf` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5",
"allOf": [
{
"$ref": "#/definitions/jwt.NumericDate"
}
]
},
"product": {
"description": "Add your custom license claims here",
"type": "string"
},
"sub": {
"description": "the `sub` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2",
"type": "string"
}
}
},
"models.AllocatedResources": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2668,6 +2784,15 @@
}
}
},
"types.License": {
"type": "object",
"properties": {
"LocalPath": {
"description": "LocalPath specifies the local license file path",
"type": "string"
}
}
},
"types.LocalPublisher": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2760,6 +2885,14 @@
"description": "Host specifies the hostname or IP address on which the Orchestrator server listens for compute node connections.",
"type": "string"
},
"License": {
"description": "License specifies license configuration for orchestrator node",
"allOf": [
{
"$ref": "#/definitions/types.License"
}
]
},
"NodeManager": {
"$ref": "#/definitions/types.NodeManager"
},
Expand Down
Loading

0 comments on commit 1d3b71d

Please sign in to comment.