Initial commit

This commit is contained in:
2025-07-08 17:39:01 +00:00
commit 686cdb80b5
36 changed files with 3338 additions and 0 deletions

View File

@ -0,0 +1,99 @@
{
"swagger": "2.0",
"info": {
"title": "demo/app/v1alpha1/app.proto",
"version": "version not set"
},
"tags": [
{
"name": "DemoAppService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1alpha1/demo": {
"get": {
"operationId": "DemoAppService_GetDemo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1alpha1GetDemoResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "language",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"DemoAppService"
]
}
}
},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1alpha1GetDemoResponse": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"fact": {
"type": "string"
},
"source": {
"type": "string"
},
"language": {
"type": "string"
}
},
"title": "Returns a randome fact, because this is a demo app\nso what else do we do?"
}
}
}

143
contrib/schema.json Normal file
View File

@ -0,0 +1,143 @@
{
"definitions": {
"ConfigDemoOpts": {
"properties": {
"factLang": {
"default": "en",
"type": "string"
},
"factType": {
"default": "random",
"enum": [
"today",
"random"
],
"type": "string"
}
},
"type": "object"
},
"ConfigGRPCConfig": {
"properties": {
"enableGRPCGateway": {
"default": true,
"type": "boolean"
},
"enableInstrumentation": {
"type": "boolean"
},
"enableReflection": {
"type": "boolean"
},
"enabled": {
"type": "boolean"
},
"grpcGatewayPath": {
"default": "/grpc-api",
"type": "string"
},
"listen": {
"type": "string"
},
"logRequests": {
"type": "boolean"
}
},
"type": "object"
},
"ConfigHTTPConfig": {
"properties": {
"enabled": {
"type": "boolean"
},
"idleTimeout": {
"type": "string"
},
"listen": {
"type": "string"
},
"logRequests": {
"type": "boolean"
},
"readTimeout": {
"type": "string"
},
"writeTimeout": {
"type": "string"
}
},
"type": "object"
},
"ConfigLogConfig": {
"properties": {
"enabled": {
"type": "boolean"
},
"format": {
"type": "string"
},
"level": {
"type": "string"
},
"output": {
"type": "string"
},
"timeFormat": {
"type": "string"
}
},
"type": "object"
},
"ConfigOTELConfig": {
"properties": {
"enabled": {
"type": "boolean"
},
"metricIntervalSecs": {
"type": "integer"
},
"prometheusEnabled": {
"type": "boolean"
},
"prometheusPath": {
"type": "string"
},
"stdoutEnabled": {
"type": "boolean"
}
},
"type": "object"
}
},
"properties": {
"environment": {
"type": "string"
},
"grpc": {
"$ref": "#/definitions/ConfigGRPCConfig"
},
"http": {
"$ref": "#/definitions/ConfigHTTPConfig"
},
"logging": {
"$ref": "#/definitions/ConfigLogConfig"
},
"name": {
"type": "string"
},
"opts": {
"$ref": "#/definitions/ConfigDemoOpts"
},
"otel": {
"$ref": "#/definitions/ConfigOTELConfig"
},
"timezone": {
"default": "UTC",
"type": "string"
},
"version": {
"type": "string"
}
},
"type": "object"
}