{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oyster-hr/json-schema/oyster-hr-company-schema.json",
  "title": "company",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oyster-hr-company-api-openapi.yml#/components/schemas/company",
  "type": "object",
  "properties": {
    "companyId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "registrationNumber": {
      "type": "string"
    },
    "addresses": {
      "type": "object",
      "properties": {
        "corporateAddress": {
          "type": [
            "object",
            "null"
          ],
          "$ref": "#/$defs/address"
        },
        "billingAddress": {
          "type": [
            "object",
            "null"
          ],
          "$ref": "#/$defs/address"
        }
      }
    }
  },
  "required": [
    "companyId",
    "name",
    "registrationNumber",
    "addresses"
  ],
  "$defs": {
    "address": {
      "type": "object",
      "properties": {
        "addressId": {
          "type": "string"
        },
        "addressLine1": {
          "type": [
            "string",
            "null"
          ]
        },
        "addressLine2": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "region": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "postalCode": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "addressId",
        "addressLine1",
        "postalCode"
      ]
    }
  }
}