TanmoySG / w-service-manager

Service Manager for wunderPlatform
1 stars 0 forks source link

[Documentation] SO-Audit Schema Definition #9

Closed TanmoySG closed 2 years ago

TanmoySG commented 2 years ago

Add SO-Audit Schema Definition to the schema/ directory.

[Checkpoints]

[Additional Information] Add additional information as per need. Snippets, References, etc.

TanmoySG commented 2 years ago

https://cswr.github.io/JsonSchema/spec/definitions_references/#definitions

TanmoySG commented 2 years ago

https://opis.io/json-schema/2.x/definitions.html

TanmoySG commented 2 years ago

https://www.mongodb.com/basics/json-schema-examples

TanmoySG commented 2 years ago

https://habr.com/en/post/571660/

TanmoySG commented 2 years ago
{
    "components": {
      "schemas": {
        "spec": {
          "type": "object",
          "required": [
            "replicas",
            "datacenter_namespace",
            "datacenter",
            "image",
            "pipeline"
          ],
          "properties": {
            "replicas": {
              "type": "integer",
              "minimum": 0
            },
            "datacenter": {
              "type": "string"
            },
            "resource_limits": {
              "$ref": "#/components/schemas/ContainerResourceLimits"
            },
            "environment": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnvironmentValue"
              }
            }
          },
          "additionalProperties": false
        },
        "EnvironmentValueName": {
          "type": "string",
          "pattern": "[A-Z]+(_[A-Z]+)*"
        },
        "ContainerResourceRequests": {
          "type": "object",
          "required": [
            "cpu_request",
            "mem_request"
          ],
          "additionalProperties": false,
          "properties": {
            "cpu_request": {
              "type": "string"
            },
            "mem_request": {
              "type": "string"
            }
          }
        }
      }
    }
  }