All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
unique_ids
now doesn't have exponential running time if there's no ID fields #144
- Dropped support for Python 3.6 & 3.7, as these are now end of life.
- Jsonschema 4.18+ is now required. Support for 3 and older versions of 4 is removed.
- Restore jsonschema's type validator, as its performance has improved in recent Python versions #127
- Allow
SchemaJsonMixin
classes to define avalidator
method, that accepts lib-cove's JSON Schema draft 4 validator class and its format checker, and returns a validator instance. #128 - If the above
validator
option is not being used, allowSchemaJsonMixin
classes to define aregistry
value. Should be a referencing.Registry instance. #123
- Calculate additional codelist values for schema using
anyOf
oroneOf
, like OCDS record packages open-contracting/lib-cove-ocds#106 - Descend into nullable objects and arrays. (For example, OCDS
parties/details
is nullable, and additional codes forparties/details/scale
were unreported.) #131
- Eliminate size limit on caching requests #120
- Fix crash when tmp directory is on different filesystem #84
- Use sentence case consistently in validation error messages #28
- Support jsonschema>=4.10 #118
- Allow jsonschema version 4.
- Support arrays of strings that must be on a codelist ThreeSixtyGiving/dataquality#80
- Add
SchemaJsonMixin.process_codelists
(previously only existed in lib-cove-ocds, will be used by 360 CoVE) #109
- Numeric "id" values no longer cause an exception while yielding a validation error about non-unique IDs.
- Make work with all versions of jsonref
- Lock to a version of jsonref<1 to avoid breaking changes in 1.0.0
- oneOf validator will read a new "oneOfEnumSelectorField" option in schema and use that to pick subschema. (Previously this worked for "statementType" only, for BODS)
- Switch from strict-rfc3339 to rfc3339-validator, because jsonschema has dropped support #97
- Lock to jsonschema version 3 (we use internal tools that are not available in V4)
- Various performance improvements open-contracting/lib-cove-oc4ids#23
- Add a function to calculate field coverage open-contracting/cove-oc4ids#98
- Update
unique_ids
override to support multiple ids. If you calledunique_ids
withid_name="some_id"
, you now need to callid_names=["some_id"]
. See this lib-cove-ocds PR as an example: https://github.com/open-contracting/lib-cove-ocds/pull/91/files
- Don't error on some decimals open-contracting/cove-ocds#158
- Drop Python 3.5 support #81
- Remove unused dependencies from setup.py #80
- Fix a typo of a variable name, that meant
date-time
anduri
validation messages were incorrectly grouped
get_schema_validation_errors
and thereforecommon_checks_context
return more fields on each error dictionary, so that we can replace the message with a translation in lib-cove-web
- Don't error when the value for the
items
key in a JSON Schema is not a dict
- Remove dependency on fcntl, improve Windows support #74
- JSON Schema is not guaranteed to set
type
, so look forproperties
oritems
instead (inschema_dict_fields_generator
)
- Don't error when JSON schema "properties" values aren't JSON Schema, and log a warning instead #71
- Fixes for translation work in 0.20.0 to work with 360Giving and IATI CoVEs
- Move all strings that show in the web frontend from here to lib-cove-web. This includes HTML validation messages. #68
- Don't require a config to be set on schema objects
- CustomRefResolver and CustomJsonrefLoader now respect
cache_all_requests
in the config
- No longer crashes when null appears in an array OpenDataServices/cove#1287
- Remove OCDS specific code. This includes renaming several methods of SchemaJsonMixin to remove the word "release". Any use of this mixin will need to be updated. This includes OCDS, 360Giving, IATI and BODS CoVEs.
- Update Django to 2.2 LTS
- v0.16.0 was tagged too early.
- Fix grouping of validation errors OpenDataServices/cove#1225
- Accept .ods format
- Depend on rfc3987 and strict-rfc3339 (optional dependencies of jsonschema) in order to validate URIs and date-times correctly lib-cove-bods#54
- Extend new oneOf validation messages to OCDS 1.0 files cove#895
- Update Django and flatten-tool versions.
- Fix uniqueItems error messages — don't report duplication where there isn't any cove#1246
- Attempt to fix uniqueItems error messages, but accidentally report duplicates when there aren't any, and not when there are (fixed in 0.12.2) cove#1246
- Change uniqueItems error messages, to remove Python repr blocks cove#1220
- Return specific validation errors for
oneOf
in OCDS records, by using the presence/absence ofid
to assume embedded/linked releases sub-schema. Only works for OCDS records. cove#895 - Add an
assumption
key to the validation JSON, to flag when one of the above assumptions has been made. cove#895 - Add an
error_id
key to the validation JSON, a machine readable ID for the error. Currently only implemented for 1 error. #31
- Remove restriction on jsonschema version (commit)
- Allow the passing of
root_id
to the conversion tool
- Allow the passing of
root_list_path
to the conversion tool
- OCDS is now available on SSL. Updated comments and tests (but no code).
- Improve CustomJsonrefLoader; make
schema_url
a required parameter. - Improve UI for validation errors on array items.
- More tests.
- Add new additional fields section to context which list all additional fields. It also states which are top level additional fields with all their descendants.
- cache_all_requests config option, off by default
- New function libcove.tools.get_request(). Pass it a config and it will use cache_all_requests option to decide whether to cache or not. (Also has force_cache option)
- load_codelist function now takes a config option, and will cache requests if set (Uses new get_request function)
- load_core_codelists function now takes a config option, and will cache requests if set.
- SchemaJsonMixin will check a config varible in the class as well as cache_schema variable (Uses new get_request function)
- Put more data into the error JSON returned, when grouping validation errors. This will allow different CoVEs to write their own validation messages. #14
- Return specific validation errors for
oneOf
, by usingstatementType
to pick the correct sub-schema. Only works for BODS. cove-bods#16
- Require jsonschema version before 2.7
- Put validator type into the context OpenDataServices/cove#1117
- filter_conversion_warnings in converters.py - fix deprecation of logger.warn to logger.warning.
- get_file_type fix - when passed a Django file object to a JSON file without the .json extension, will detect as 'json'
- convert_spreadsheet passes xml_comment to flatten_tool
- Fix broken key names that caused problems for IATI
- Added get_orgids_prefixes to common
- First Release