{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/queryfirst-config-file/versions/1.0.json",
  "description": "A configuration file for Queryfirst (https://queryfirst.net), named qfconfig.json",
  "x-lintel": {
    "source": "https://www.schemastore.org/qfconfig.json",
    "sourceSha256": "6d8be949492f95495c0e9a6a1b355ef516056e540a74b8003b9727ed11caa726",
    "fileMatch": [
      "qfconfig.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "defaultConnection": {
      "type": "string"
    },
    "provider": {
      "enum": [
        "Microsoft.Data.SqlClient",
        "MySql.Data.MySqlClient",
        "Npgsql",
        "System.Data.SqlClient"
      ]
    },
    "generators": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/generator"
      }
    },
    "connectEditor2DB": {
      "type": "boolean"
    },
    "helperAssemblies": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "makeSelfTest": {
      "type": "boolean",
      "description": "Should QueryFirst add a selfTest method to the generated code? You will need add xunit and QueryFirst.CoreLib nugets to your project."
    },
    "repoSuffix": {
      "type": "string",
      "description": "Suffix to append to the query base name to get the generated repository class name"
    },
    "dtoSuffix": {
      "type": "string",
      "description": "Suffix to append to the query base name to get the result class name"
    }
  },
  "id": "https://json.schemastore.org/qfconfig.json",
  "$defs": {
    "generator": {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "CSharp",
            "TsInterfaceFromDto"
          ]
        },
        "options": {
          "description": "Generators are loosely coupled. Options are passed as a string dictionary. Only strings here sorry.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
