Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
european-cloud-industry
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fonds-de-Dotation-du-Libre
european-cloud-industry
Commits
186c8cf7
Commit
186c8cf7
authored
Jul 08, 2022
by
Sven Franck
Committed by
GitHub
Jul 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add validation (part 1)
parent
7aded01c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
14 deletions
+41
-14
data/JSON-schema.json
data/JSON-schema.json
+41
-14
No files found.
data/JSON-schema.json
View file @
186c8cf7
...
...
@@ -3,55 +3,82 @@
"$id"
:
"https://example.com/person.schema.json"
,
"$schema"
:
"https://json-schema.org/draft/2020-12/schema"
,
"type"
:
"object"
,
"definitions"
:
{
"saneUrl"
:
{
"format"
:
"uri"
,
"pattern"
:
"^https?://"
}
},
"properties"
:
{
"created"
:
{
"type"
:
"string"
,
"format"
:
"date"
"format"
:
"date"
,
"pattern"
:
"^
\\
d{4}
\\
-(0?[1-9]|1[012])
\\
-(0?[1-9]|[12][0-9]|3[01])$"
},
"title"
:
{
"type"
:
"string"
},
"type"
:
{
"type"
:
"string"
"type"
:
"string"
,
"enum"
:
[
"Organisation"
,
"Association"
,
"Other"
]
},
"logo_url"
:
{
"type"
:
"string"
"anyOf"
:
[{
"$ref"
:
"#/definitions/saneUrl"
},
{
"type"
:
"string"
,
"maxLength"
:
0
}]
},
"location"
:
{
"type"
:
"object"
,
"properties"
:
{
"title"
:
{
"type"
:
"string"
,
"description"
:
"name"
"description"
:
"
Entity
name"
},
"address"
:
{
"type"
:
"string"
,
"description"
:
"
Compan
y address"
"description"
:
"
Entit
y address"
},
"postal-code"
:
{
"description"
:
"
Postal code must be composed of 5 numbers equal or greater than 0
"
,
"description"
:
"
Entity postal
"
,
"type"
:
"string"
},
"city"
:
{
"type"
:
"string"
,
"description"
:
"
name
"
"description"
:
"
Entity city
"
},
"country"
:
{
"type"
:
"string"
,
"pattern"
:
"^[A-Z]{2}$"
,
"description"
:
"
A
valid 2-digit ISO country code (ISO 3166-1 alpha-2)"
"description"
:
"
Entity country - a
valid 2-digit ISO country code (ISO 3166-1 alpha-2)"
},
"phone_contact"
:
{
"description"
:
"
Phone number which must be equal to or greater than zero preceded by
"
,
"description"
:
"
Entity phone contact
"
,
"type"
:
"string"
},
"mail_contact"
:
{
"description"
:
""
,
"type"
:
"string"
"anyOf"
:
[{
"description"
:
"Entity email contact"
,
"type"
:
"string"
,
"pattern"
:
"^
\\
S+@
\\
S+
\\
.
\\
S+$"
,
"format"
:
"email"
,
"minLength"
:
6
,
"maxLength"
:
127
},
{
"type"
:
"string"
,
"maxLength"
:
0
}]
},
"coordinate_list"
:
{
"description"
:
"Geographical coordinates of the company"
,
"type"
:
"array"
"description"
:
"Geographical coordinates of the entity"
,
"type"
:
"array"
,
"maxItems"
:
2
,
"items"
:
{
"type"
:
"number"
}
}
}
},
...
...
@@ -289,4 +316,4 @@
}
}
}
]
\ No newline at end of file
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment