Skip to content

Commit

Permalink
better service type validation
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeledy committed Feb 7, 2025
1 parent 269e9b8 commit 3ec258a
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions landofile-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,25 @@
"properties": {
"type": {
"type": "string",
"description": "The type of service.",
"description": "The Lando service type in the format 'string:version'.",
"oneOf": [
{
"const": "lando"
},
{
"pattern": "^[a-zA-Z0-9_-]+:[0-9]+(\\.[0-9]+)*$",
}
],
"not": {
"pattern": "^[a-zA-Z0-9_-]+$",
"description": "Specifying a service type without a version is deprecated. Please include the version."
},
"examples": [
"node",
"php:7.4",
"nginx",
"apache",
"mysql:5.7",
"compose",
"node:22",
"php:8.4",
"nginx:1.27",
"apache:2.4",
"mysql:8.0",
"lando"
],
"pattern": "^[a-zA-Z0-9._-]+(:[a-zA-Z0-9._-]+)?$"
Expand Down Expand Up @@ -364,21 +375,6 @@
3000
]
},
"portforward": {
"description": "Forwards a port to the host OS. Use `true` to allow Docker to manage ports (recommended). You may also specify a port number, but there is risk of conflicting with other services or applications.",
"oneOf": [
{
"type": "boolean"
},
{
"type": "number"
}
],
"examples": [
true,
3000
]
},
"scanner": {
"oneOf": [
{
Expand Down

0 comments on commit 3ec258a

Please sign in to comment.