Skip to content

Commit

Permalink
Use strict types in schema.json
Browse files Browse the repository at this point in the history
  • Loading branch information
guvra committed Jun 4, 2024
1 parent c13a7fc commit 3b44e53
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ All notable changes to this project will be documented in this file.

## 5.0.0 (WIP)

Breaking changes:

- Added table column validation. GdprDump now throws an exception if a config file contains an undefined column ([#125](https://github.com/Smile-SA/gdpr-dump/pull/125))
- Removed support of the `filters` parameter. Use the `where` parameter instead ([#128](https://github.com/Smile-SA/gdpr-dump/pull/128))
- Removed undefined column customer_address.vat_id from shopware6 template ([#132](https://github.com/Smile-SA/gdpr-dump/pull/132))
- Stricter config file validation: string parameters don't accept integer values anymore ([#129](https://github.com/Smile-SA/gdpr-dump/pull/129))

## [4.2.2] - 2024-03-26
[4.2.2]: https://github.com/Smile-SA/gdpr-dump/compare/4.2.1...4.2.2
Expand Down
34 changes: 17 additions & 17 deletions app/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "boolean"
},
"version": {
"type": ["string", "number"]
"type": "string"
},
"if_version": {
"type": "object",
Expand Down Expand Up @@ -43,14 +43,14 @@
"tables_whitelist": {
"type": "array",
"items": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
}
},
"tables_blacklist": {
"type": "array",
"items": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
}
}
Expand Down Expand Up @@ -84,30 +84,30 @@
}
},
"host": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"port": {
"type": ["string", "integer"],
"type": "integer",
"minLength": 1
},
"user": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"password": {
"type": ["string", "number"]
"type": "string"
},
"name": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"charset": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"unix_socket": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
}
},
Expand All @@ -117,7 +117,7 @@
"type": "object",
"properties": {
"output": {
"type": ["string", "number"],
"type": "string",
"minLength": 1
},
"add_drop_database": {
Expand Down Expand Up @@ -237,16 +237,16 @@
}
},
"skip_conversion_if": {
"type": ["string", "number"]
"type": "string"
},
"where": {
"type": ["string"]
"type": "string"
},
"filters": {
"deprecated": true
},
"order_by": {
"type": ["string", "number"]
"type": "string"
},
"limit": {
"type": ["integer", "null"]
Expand All @@ -255,7 +255,7 @@
"additionalProperties": false
},
"converter": {
"type": ["object"],
"type": "object",
"properties": {
"converter": {
"type": "string",
Expand Down Expand Up @@ -292,13 +292,13 @@
}
},
"condition": {
"type": ["string", "number"]
"type": "string"
},
"unique": {
"type": "boolean"
},
"cache_key": {
"type": ["string", "number"]
"type": "string"
},
"disabled": {
"type": "boolean"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testDatabaseSettings(): void
'user' => 'myuser',
'password' => 'mypassword',
'host' => 'myhost',
'port' => '3306',
'port' => 3306,
'driver' => 'pdo_mysql',
'charset' => 'utf8mb',
'driver_options' => [
Expand Down

0 comments on commit 3b44e53

Please sign in to comment.