Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
236 commits
Select commit Hold shift + click to select a range
5c03162
Update README.markdown
horejsek Oct 19, 2017
04f140b
fix pip install documentation
anentropic Oct 31, 2017
6a41f13
Merge pull request #2 from anentropic/patch-1
horejsek Oct 31, 2017
af6d7d7
Add test suite submodule
krismolendyke Mar 12, 2018
04b26b5
Add test runner script
krismolendyke Mar 12, 2018
0ad1589
Update test requirements, install target
krismolendyke Mar 13, 2018
28e96f4
Fix performance script
krismolendyke Mar 14, 2018
cb650e2
Fix typo
krismolendyke Mar 13, 2018
a8ba7c4
Validate minimum and maximum for non-numbers
krismolendyke Mar 13, 2018
93f23a3
Validate additional properties
krismolendyke Mar 14, 2018
494b6ce
Validate additional items
krismolendyke Mar 14, 2018
fe82f6e
Validate not
krismolendyke Mar 14, 2018
d3648df
Validate items
krismolendyke Mar 14, 2018
f1e353c
Validate max items
krismolendyke Mar 14, 2018
3419f30
Validate max length
krismolendyke Mar 14, 2018
306914b
Validate max properties
krismolendyke Mar 14, 2018
11f72ce
Validate min items
krismolendyke Mar 14, 2018
3493b38
Validate min length
krismolendyke Mar 14, 2018
a4d68a8
Validate min properties
krismolendyke Mar 14, 2018
7067946
Validate multiple of
krismolendyke Mar 14, 2018
81eb575
Validate required
krismolendyke Mar 14, 2018
668f824
Validate pattern
krismolendyke Mar 14, 2018
ae98690
Validate pattern properties
krismolendyke Mar 15, 2018
0e71323
Test instance type not attribute
krismolendyke Mar 17, 2018
83af56a
Simplify additional properties logic
krismolendyke Mar 20, 2018
8015d6a
Fix properties keys check
krismolendyke Mar 20, 2018
510bdbc
Merge pull request #3 from krismolendyke/json-schema-draft4
horejsek Mar 27, 2018
a0ae267
Pytest JSON schema test suits
Mar 27, 2018
0c6652c
Fixed check of minimum and maximum
Mar 27, 2018
da1dbc0
Removed unused code with undeclared variable
Mar 27, 2018
c8dad87
Pattern and additional properties and soon-return fixes
Mar 28, 2018
366c84b
Base support of references
Mar 28, 2018
9cfe5da
Support of formats
Mar 28, 2018
cc6925e
Merge pull request #4 from seznam/json-schema-draft4
horejsek Mar 28, 2018
fae4509
#5 Fix underscores in property names
horejsek Apr 24, 2018
a14b53f
Documentation
horejsek Apr 24, 2018
e7fbac0
Support uniqueItems of objects
horejsek Apr 24, 2018
ffe222b
Version 1.2
horejsek Apr 24, 2018
43b4899
#6 Fix pattern inside of anyOf
horejsek Apr 25, 2018
999506b
Version 1.3
horejsek Apr 25, 2018
83a004e
More precise date-time regex and handling of '+hh:mm'
Apr 25, 2018
72d4c8b
Merge pull request #7 from gdraynz/date-time-regex
horejsek Apr 25, 2018
d44cf03
#8 Raise exception instead of silent pass
horejsek Apr 30, 2018
2b1bdd9
#8 NotImplementedError instead of Exception
horejsek Apr 30, 2018
990aec5
implementation for dependencies
Jokipii Jun 11, 2018
fe7595c
Merge pull request #9 from Jokipii/master
horejsek Jun 11, 2018
65e029a
Version 1.4
horejsek Jun 11, 2018
d873e12
partial ref implementation: 15 new cases into xpassed
Jokipii Jun 12, 2018
7be8551
pass definitions test + 2 more xpasses for local ref tests
Jokipii Jun 13, 2018
d22bbfc
fix ref fragment parsing: 2 more xpassed
Jokipii Jun 13, 2018
95df60d
RefResolver adapted from https://github.com/Julian/jsonschema. 4 case…
Jokipii Jun 14, 2018
8b8727c
fix ref_resolver + small refactoring: extract run_generate_functions
Jokipii Jun 14, 2018
4cf248c
Recursive references between schemas works now
Jokipii Jun 14, 2018
9563156
Test test_json_schema_test_suits.py fakes now needed adresses at loca…
Jokipii Jun 14, 2018
3c1a7c2
Fix for tests - Printing results when tests fail make them actually f…
Jokipii Jun 14, 2018
8de0ad2
Implementation for ``definitions`` and ``ref``
Jokipii Jun 12, 2018
d2a106b
merge
Jokipii Jun 14, 2018
3b964b0
Ref resolving moved on ref_resolver.walk function, all ref test cases…
Jokipii Jun 19, 2018
89b100d
Update documentation about 'definitions' and 'ref'
Jokipii Jun 19, 2018
e2573d8
Better explanation
Jokipii Jun 19, 2018
51b5229
main function generation moved in `generate_validation_function`
Jokipii Jun 19, 2018
e4ec4fd
format: regex validated agains python re.compile
Jokipii Jun 19, 2018
75aa2a9
write_code implementation
Jokipii Jun 19, 2018
c293a07
Merge pull request #11 from Jokipii/ref-implementation
horejsek Jun 20, 2018
ba27e48
tox.ini + front page README.markdown updates
Jokipii Jun 20, 2018
bb2860d
tox.ini missed from previous commit
Jokipii Jun 20, 2018
0292b57
Json-Schema-Test-Suite test for draft-06 and draft-07 with ignores
Jokipii Jun 20, 2018
5cd9051
v1.5
horejsek Jun 20, 2018
7fcf49d
Args documentation for compile
Jokipii Jun 20, 2018
a43bd85
Merge remote-tracking branch 'upstream/master' into doc
Jokipii Jun 20, 2018
f0c8a0b
fix 2 RefResolver bugs, 'id', and '$ref' properties handled as they a…
Jokipii Jun 21, 2018
90d37fc
Merge remote-tracking branch 'origin/master' into doc
Jokipii Jun 21, 2018
d708c38
Merge remote-tracking branch 'origin/master' into write-code
Jokipii Jun 21, 2018
aa9995e
better documentation
Jokipii Jun 21, 2018
6b74045
fix test name
Jokipii Jun 21, 2018
b38bfb5
Merge pull request #13 from Jokipii/master
horejsek Jun 21, 2018
b9fa48a
Merge remote-tracking branch 'upstream/master' into write-code
Jokipii Jun 21, 2018
f6ae547
test for write_code, prevent overwrite if not flagged, .gitignore tem…
Jokipii Jun 21, 2018
ac5b71e
New performance test: fast_file added.
Jokipii Jun 21, 2018
71edfe5
Merge remote-tracking branch 'upstream/master' into doc
Jokipii Jun 21, 2018
37669b0
v1.6
horejsek Jun 21, 2018
f7953c7
README changed to rst so it can be directly used in PyPI thru setup.py
Jokipii Jun 21, 2018
fb1199d
Merge remote-tracking branch 'upstream/master' into doc
Jokipii Jun 21, 2018
01ad676
Working tox.ini
Jokipii Jun 21, 2018
dde6db2
LICENSE file
Jokipii Jun 22, 2018
f89a62b
remove unused method + unused import
Jokipii Jun 23, 2018
a5c2529
Merge pull request #17 from Jokipii/master
horejsek Jun 25, 2018
9a5fd5e
Merge pull request #14 from Jokipii/write-code
horejsek Jun 25, 2018
0c5de5a
Compile to code, pylint, Makefile with venv
horejsek Jun 25, 2018
08e6ebf
merge to upstream/master
Jokipii Jun 28, 2018
068865e
remove test-requirements.txt that is not needed
Jokipii Jun 28, 2018
2489fc4
remove duplicate code
Jokipii Jun 28, 2018
f1b4b12
rename test, because name already in use
Jokipii Jun 28, 2018
ca113f6
fix docstring intendation, so sphinx do not complain when making docs
Jokipii Jun 28, 2018
5909b6b
.gitignore
Jokipii Jun 28, 2018
84a6c54
Merge pull request #15 from Jokipii/doc
horejsek Jul 21, 2018
655d08f
Clean up
horejsek Jul 21, 2018
2ace14a
Fixed Makefile
horejsek Jul 21, 2018
298ba22
Benchmarks
Jul 26, 2018
9a60247
Optimalization of isinstance of dicts and lists
Jul 26, 2018
475073c
Fix of additional properties
Jul 26, 2018
d6f0eb4
Optimalization of one of counting
Jul 26, 2018
d32022c
Authors
Jul 26, 2018
8069e16
Prepared classes for JSON draft 6 and 7
horejsek Aug 10, 2018
ddb56c1
Support of new keywords from JSON schema draft 06 and 07
Aug 13, 2018
7d1aa13
A float without fractional part is an integer
Aug 14, 2018
e83cca3
Boolean or empty array in dependencies
Aug 14, 2018
fc5467d
Boolean in items
Aug 14, 2018
696ffb1
Boolean schemas
Aug 14, 2018
fcc6b62
New formats
Aug 14, 2018
dd20246
Finished support of boolean schemas
Aug 14, 2018
5a469b7
Validation of json pointer format
Aug 14, 2018
133cd8b
Comment which tests are optional
Aug 14, 2018
c8ac899
Lint
Aug 14, 2018
dd651fc
Doc strings
horejsek Aug 25, 2018
7129c47
Fix generating missing formats
horejsek Aug 25, 2018
69aa835
Support of in ref resolver
horejsek Sep 7, 2018
1f756ee
Detect version from definition
horejsek Sep 7, 2018
831d484
Version 2.0
horejsek Sep 7, 2018
88a3941
Changelog
horejsek Sep 7, 2018
58cba37
#21 Fix code generation with regex patterns
horejsek Sep 12, 2018
dc3ae94
Fixed link in README
horejsek Sep 12, 2018
e903369
Added failing test case for #23
FrederikP Sep 12, 2018
193838a
Allow date-time strings without milliseconds. Fixes #23
FrederikP Sep 12, 2018
08f29dc
Added failing test case for #22
FrederikP Sep 12, 2018
97d45db
Merge pull request #24 from FrederikP/master
horejsek Sep 12, 2018
8ff3171
Fixed #22
FrederikP Sep 12, 2018
8a1deb8
Merge pull request #25 from FrederikP/fix22
horejsek Sep 12, 2018
85cb8ab
Comment
horejsek Sep 12, 2018
a6f7bf0
Updated AUTHORS
horejsek Sep 12, 2018
6c07d23
Version 2.2
horejsek Sep 12, 2018
ad5d89b
Created failing test case for #26
FrederikP Sep 12, 2018
aca2aaa
Switched to different hostname regex as this one did not allow for 2 …
FrederikP Sep 12, 2018
eb346dc
Added length limit to hostname labels in regex and fixed test name me…
FrederikP Sep 14, 2018
2a789f8
Merge pull request #27 from FrederikP/fix26
horejsek Sep 14, 2018
b6c4850
Merged format tests into one file
horejsek Sep 14, 2018
3eb5b3a
Version 2.3
horejsek Sep 14, 2018
c07c95c
Exception message
horejsek Sep 20, 2018
90e34b6
#28 Fix overriding variables in pattern properties
horejsek Sep 26, 2018
e18a0d8
Fix of overriding variables in general
horejsek Sep 26, 2018
acec3cb
Improved documentation
horejsek Sep 26, 2018
26469cd
#29 Fix string in const
horejsek Sep 27, 2018
e88b686
Improved security
horejsek Sep 27, 2018
8432be5
Added validate function
horejsek Sep 27, 2018
a9c3794
Comment about performance
horejsek Sep 27, 2018
90c3d52
Version 2.4
horejsek Sep 27, 2018
6373c4b
Doc fix
horejsek Oct 1, 2018
ddb4813
typo
bndo Oct 2, 2018
2abbf6e
Merge pull request #31 from bndo/patch-1
horejsek Oct 3, 2018
c0f1964
Be more flexible in email validation
Oct 4, 2018
7d4fde5
Docs
horejsek Oct 4, 2018
80d8c92
Docs
horejsek Oct 4, 2018
983a473
Merge pull request #32 from masteralves/master
horejsek Oct 22, 2018
5a26a8a
Version 2.5
horejsek Oct 22, 2018
80b772f
Use ECMA 262 definition of $ (end of string like \Z)
bcaller Oct 26, 2018
27cddc1
Forbid \n at end of email, datetime, etc
bcaller Oct 26, 2018
3931408
Merge pull request #34 from bcaller/regex-dollar
horejsek Nov 1, 2018
7b738b7
Version 2.6
Nov 1, 2018
bcfb834
Docs
Nov 1, 2018
dd79d0f
Python 3.7 regex bug fixed
bcaller Nov 5, 2018
80b1522
Fix tox & linting, add linting to tox.ini
bcaller Nov 5, 2018
ec16fac
Merge pull request #38 from bcaller/py37
horejsek Nov 5, 2018
05b0ee2
Version 2.7
horejsek Nov 16, 2018
c0ff67b
#40 Fix invalid code with quotes in enum
horejsek Jan 5, 2019
a185faa
Version 2.8
horejsek Jan 5, 2019
aa3644a
substituted requests package with urllib
remorses Mar 3, 2019
a94b832
removed space
remorses Mar 3, 2019
b45004e
Merge pull request #44 from remorses/master
horejsek Mar 4, 2019
0f7bd0e
Version 2.9
horejsek Mar 4, 2019
b335a40
Fixed pattern regexps with a space
horejsek Apr 15, 2019
8c38d0f
Fixed colliding variables
horejsek Apr 16, 2019
8e8133e
Fixed clearing variables for properties blocks
horejsek May 24, 2019
d98ea82
Makefile: Run pytest with "-W default"
dmajda Jun 6, 2019
1f5685a
Add escaping in exception message for "pattern"
dmajda Jun 6, 2019
e84fa02
Add escaping in generated code for "patternProperties"
dmajda Jun 6, 2019
6b8498d
Merge pull request #52 from energomonitor/fix-pattern-escaping
horejsek Jun 9, 2019
afbd9e9
Updated JSON test suites
horejsek Jun 10, 2019
c4b6338
Fix escaping
horejsek Jun 10, 2019
e73b14e
Fix date-time regexp
horejsek Jun 10, 2019
cbd017f
Ignore IRI tests
horejsek Jun 10, 2019
cc80a08
Updated AUTHORS
horejsek Jun 10, 2019
26187ef
Version 2.13
horejsek Jun 10, 2019
2cd86e4
Python 3.7 and 3.8 is supported
horejsek Jun 10, 2019
b1ba806
Only RFC3339 is possible for date-time format (time zone is required)
horejsek Jun 18, 2019
807d3c4
Changelog
horejsek Jun 18, 2019
3eca153
Add handlers to validate methode and introduce format_checkers
ystreibel Jul 26, 2019
78dd60e
renaming format_chechers to formats and add str, re.pattern
ystreibel Aug 20, 2019
aa4ea89
Merge pull request #57 from ystreibel/master
horejsek Sep 24, 2019
b21744f
Better implementation of custom formats
horejsek Sep 24, 2019
4c8e5fc
Raise JsonSchemaDefinitionException when definition of property is no…
horejsek Sep 25, 2019
3252d06
Fix of uniqueItems when used with other than array type
horejsek Sep 26, 2019
49facc2
Optimization: do not do the same type checks, keep it in one block if…
horejsek Sep 26, 2019
e4f1a57
Indent fix
horejsek Oct 6, 2019
d43ed34
Raise JSONSchemaDefinitionException when the property definition is n…
horejsek Oct 6, 2019
93194b8
Context in exceptions
horejsek Oct 6, 2019
a0d3189
rule and rule_definition properties on Exception
horejsek Oct 8, 2019
7def41c
Version 2.14.0
horejsek Oct 8, 2019
83494f3
Version 2.14.0
horejsek Oct 8, 2019
c2bfae3
Fix of undefined format exception message
horejsek Oct 9, 2019
c4d648f
Version 2.14.1
horejsek Oct 9, 2019
82793ed
Better docs
horejsek Oct 9, 2019
52071a8
Minor correction to documentation
Oct 12, 2019
9d3df9a
Merge pull request #67 from GregKuhlmann/master
horejsek Oct 12, 2019
a0754eb
Fiix of additionalProperties set to true in JSON schema 4
horejsek Oct 27, 2019
5104e25
include LICENSE in distributed tarball
bollwyvl Nov 9, 2019
4c617e7
Merge pull request #73 from bollwyvl/distribute-license
horejsek Nov 24, 2019
fd1706f
try: block should not be optimized
hh-h Nov 29, 2019
9816399
Merge pull request #77 from hh-h/fix-try
horejsek Dec 9, 2019
2fc222c
Use decimal for multipleOf implementation and add respective tests
leiserfg Dec 9, 2019
d7d6f81
Merge pull request #80 from leiserfg/fix-multiple
horejsek Dec 11, 2019
2aee6eb
Use Decimal for multipleOf when the value is float
horejsek Dec 11, 2019
7e94996
Better escaping of definition names
horejsek Dec 11, 2019
ba998ab
Version 2.14.2
horejsek Dec 11, 2019
9b59b95
fair performance test + robust script
hh-h Dec 18, 2019
e845f62
Merge pull request #82 from hh-h/perf
horejsek Dec 19, 2019
346ac60
Initial base test
vEpiphyte Feb 26, 2020
be185f2
WIP - ugly implementation
vEpiphyte Feb 26, 2020
201e0ae
Another potential spot..
vEpiphyte Feb 26, 2020
dce8d75
Add mixed arrays test, update integration test
vEpiphyte Feb 27, 2020
5d02834
test cleanup
vEpiphyte Feb 27, 2020
262fb45
Cleanup tests
vEpiphyte Feb 27, 2020
40a9c0d
incremental cleanup
vEpiphyte Feb 27, 2020
05d108e
cleanup
vEpiphyte Feb 27, 2020
f9eeb60
Revert extra change
vEpiphyte Feb 27, 2020
f27c991
Merge pull request #88 from vertexproject/tuples_as_arrays
horejsek Feb 27, 2020
ead5ad5
Version 2.14.3
horejsek Feb 27, 2020
b93e0a3
Fix property
horejsek Mar 19, 2020
61c6997
Add extra properties to error message when additionalProperties are s…
horejsek Mar 19, 2020
2c88f44
Better exception message when referencing schema is not valid JSON
horejsek Mar 19, 2020
8c8a05c
Version 2.14.4
horejsek Mar 19, 2020
400b11f
Fix missing dependenices
horejsek Aug 17, 2020
f5b3f4d
Fix schema cache
horejsek Aug 17, 2020
78ae1ae
Version 2.14.5
horejsek Aug 17, 2020
4b0d76c
Create codeql-analysis.yml
horejsek Oct 1, 2020
a0e1a5a
Add support to validate Decimals.
ridecow Oct 6, 2020
24ad688
Merge branch 'master' into feature/decimal
ridecow Oct 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 1 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['python']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
26 changes: 21 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@

# Python files
*.pyc
*.pyo
__pycache__/
.cache

# Test files
.pytest_cache/
temp/
.tox
.coverage
.testmondata
.benchmarks

# Deb files
debian/files
debian/*debhelper*
debian/*substvars

# Build files
.eggs/
*.egg-info/
build/
_build/
deb_dist/
dist/
*.tar.gz
*egg-info
MANIFEST
venv/

# Editors
.vscode
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "JSON-Schema-Test-Suite"]
path = JSON-Schema-Test-Suite
url = https://github.com/json-schema-org/JSON-Schema-Test-Suite.git
11 changes: 11 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
MAINTAINER
Michal Hořejšek <horejsekmichal@gmail.com>

CONTRIBUTORS
anentropic <ego@anentropic.com>
Antti Jokipii <anttijokipii@gmail.com>
bcaller <bcaller@users.noreply.github.com>
Frederik Petersen <fp@abusix.com>
Guillaume Desvé <guillaume.desve@surycat.com>
Kris Molendyke <krismolendyke@users.noreply.github.com>
David Majda <david@majda.cz>
155 changes: 155 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
=== 2.14.5 (2020-08-17)

* Fix missing dependencies
* Fix schema cache


=== 2.14.4 (2020-03-19)

* Fix $id property
* Add extra properties to error message when additionalProperties are set to False
* Better exception message when referencing schema is not valid JSON


=== 2.14.3 (2020-02-27)

* Tuple is also valid array


=== 2.14.2 (2019-12-11)

* Fix of `additionalProperties=true` for JSON schema 4
* Use decimal for multipleOf implementation and add respective tests
* Better escaping of definition names


=== 2.14.1 (2019-10-09)

* Fix of undefined format exception message


=== 2.14.0 (2019-10-08)

* Optimization: do not do the same type checks, keep it in one block if possible
* More context in JsonSchemaException (value, variable_name, variable_path, definition, rule and rule_definition)
* Possibility to pass custom formats
* Raise JsonSchemaDefinitionException when definition of property is not valid
* Fix of uniqueItems when used with other than array type
* Fix of date-time regexp (time zone is required by RFC 3339)


=== 2.13 (2019-06-10)

* Resolved Python 3.7 warnings
* Updated JSON Schema test suites
* Fix of date-time regexp (allow small T and Z).
* Fix escaping (proper handling of \n, \r or " everywhere).


=== 2.12 (2019-05-24)

* Fix of properties (local variable referenced before assignment).


=== 2.11 (2019-04-16)

* Fix of additionalProperties (colliding variable names).


=== 2.10 (2019-04-15)

* Fix pattern regexps with a space.


=== 2.9 (2019-03-04)

* Use of urllib instead of requests for smaller memory usage.


=== 2.8 (2019-01-05)

* Fix quotes in enum generating invalid code


=== 2.7 (2018-11-16)

* Fix regexps for Python 3.7


=== 2.6 (2018-11-01)

* Swap $ in regexps to \Z to follow ECMA 262 ($ matches really the end of the string, not the end or new line and the end). Because of that your regular expressions have to escape dollar when used as regular character.


=== 2.5 (2018-10-22)

* E-mail regex allows any e-mail with @


=== 2.4 (2018-09-27)

* Fix overriding variables (in pattern properties, property names, unique items and contains)
* Fix string in const
* Improve security: not generating code from any definition
* Added validate function for lazy programmers


=== 2.3 (2018-09-14) ===

* Fix regex of hostname


=== 2.2 (2018-09-12) ===

* Fix code generation with long regex patterns
* Fix regex of date-time (allow time without miliseconds)


=== 2.1 (2018-09-12) ===

* Fix code generation with regex patterns


=== 2.0 (2018-09-07) ===

* Support of draft-06
* Support of draft-07
* Code generation to a file


=== 1.6 (2018-06-21) ===

* Bugfixing


=== 1.5 (2018-06-20) ===

* Support of definitions
* Support of referencies


=== 1.4 (2018-06-11) ===

* Better date-time regex
* Support of dependencies


=== 1.3 (2018-04-25) ===

* Fix patter inside of anyOf


=== 1.2 (2018-04-24) ===

* Support of formats
* Support of properties


=== 1.1 (2017-01-03) ===

* Support of float numbers


=== 1.0 (2016-09-23) ===

* First version
1 change: 1 addition & 0 deletions JSON-Schema-Test-Suite
Submodule JSON-Schema-Test-Suite added at 1bd999
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2018, Michal Horejsek
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

Neither the name of the {organization} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include LICENSE
70 changes: 57 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,74 @@
.PHONY: all venv lint jsonschemasuitcases test test-lf benchmark benchmark-save performance printcode doc upload deb clean
SHELL=/bin/bash

VENV_NAME?=venv
VENV_BIN=$(shell pwd)/${VENV_NAME}/bin

PYTHON=${VENV_BIN}/python3


all:
@echo "make install - Install on local system"
@echo "make test - Run tests during development"
@echo "make performance - Run performance test of this and other implementation"
@echo "make doc - Make documentation"
@echo "make clean - Get rid of scratch and byte files"


deb:
python3 setup.py --command-packages=stdeb.command bdist_deb
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py
test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME)
# Some problem in latest version of setuptools during extracting translations.
${PYTHON} -m pip install -U pip setuptools==39.1.0
${PYTHON} -m pip install -e .[devel]
touch $(VENV_NAME)/bin/activate

lint: venv
${PYTHON} -m pylint fastjsonschema

upload:
python3 setup.py register sdist upload
jsonschemasuitcases:
git submodule init
git submodule update

install:
python3 setup.py install
test: venv jsonschemasuitcases
${PYTHON} -m pytest -W default --benchmark-skip
test-lf: venv jsonschemasuitcases
${PYTHON} -m pytest -W default --benchmark-skip --last-failed

test:
python3 -m pytest tests
# Call make benchmark-save before change and then make benchmark to compare results.
benchmark: venv jsonschemasuitcases
${PYTHON} -m pytest \
-W default \
--benchmark-only \
--benchmark-sort=name \
--benchmark-group-by=fullfunc \
--benchmark-disable-gc \
--benchmark-compare \
--benchmark-compare-fail='min:5%'
benchmark-save: venv jsonschemasuitcases
${PYTHON} -m pytest \
-W default \
--benchmark-only \
--benchmark-sort=name \
--benchmark-group-by=fullfunc \
--benchmark-disable-gc \
--benchmark-save=benchmark \
--benchmark-save-data

performance:
python3 performance.py
performance: venv
${PYTHON} performance.py

printcode: venv
cat schema.json | python3 -m fastjsonschema

doc:
cd docs; make

upload: venv
${PYTHON} setup.py register sdist bdist_wheel upload

deb: venv
${PYTHON} setup.py --command-packages=stdeb.command bdist_deb

clean:
python3 setup.py clean
find . -name '*.pyc' -delete
find . -name '*.pyc' -exec rm --force {} +
rm -rf $(VENV_NAME) *.eggs *.egg-info dist build docs/_build .mypy_cache .cache
Loading