Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-advanced-user-tools
Commits
0af91939
Verified
Commit
0af91939
authored
1 year ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Making typing compatible with Python 3.8
parent
d97c5426
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!89
ENH: JsonSchemaExporter accepts do_not_create parameter.
,
!82
ENH: JsonSchemaExporter accepts do_not_create parameter.
Pipeline
#43065
passed
1 year ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/caosadvancedtools/json_schema_exporter.py
+3
-3
3 additions, 3 deletions
src/caosadvancedtools/json_schema_exporter.py
with
3 additions
and
3 deletions
src/caosadvancedtools/json_schema_exporter.py
+
3
−
3
View file @
0af91939
...
...
@@ -22,7 +22,7 @@
"""
Module for converting a data model into a json schema compatible dictionary.
"""
from
typing
import
Any
,
Optional
from
typing
import
Any
,
List
,
Optional
import
linkahead
as
db
from
linkahead.common.datatype
import
get_list_datatype
,
is_list_datatype
...
...
@@ -36,7 +36,7 @@ class JsonSchemaExporter:
name_and_description_in_properties
:
bool
=
False
,
additional_options_for_text_props
:
dict
=
None
,
units_in_description
:
bool
=
True
,
do_not_create
:
l
ist
[
str
]
=
None
,
do_not_create
:
L
ist
[
str
]
=
None
,
):
"""
Set up a JsonSchemaExporter, which can then be applied on RecordTypes.
...
...
@@ -272,7 +272,7 @@ def recordtype_to_json_schema(rt: db.RecordType, additional_properties: bool = T
name_and_description_in_properties
:
bool
=
False
,
additional_options_for_text_props
:
Optional
[
dict
]
=
None
,
units_in_description
:
bool
=
True
,
do_not_create
:
l
ist
[
str
]
=
None
):
do_not_create
:
L
ist
[
str
]
=
None
):
"""
Create a jsonschema from a given RecordType that can be used, e.g., to
validate a json specifying a record of the given type.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment