- Ensure
Faker
is added as a non-development dependency
- Add support for
email
string types - Use
Faker
gem to generate emails and URLs - Improve error messages when an unknown type is given in
GovukSchemas::RandomContentGenerator#string_for_type
- Fix issue where customised schema validation message was incorrect for a modified payload
- Improve speed of random schema generation for customised content items
- BREAKING: Drop support for Ruby 3.0. The minimum required Ruby version is now 3.1.4.
- Add support for Ruby 3.3.
- Add support for
json-schema
3.3.
- Update
json-schema
dependency.
- Drop support for Ruby 2.7.
- Fix guidance on fixing a regex issue to reference correct filename.
- Add support for
^[1-9][0-9]{3}$
regex to resolve exceptions randomly generating specialist_documents.
- General support for content schemas in Publishing API:
- Update default content schemas url to point to publishing api rather than govuk-content-schemas. This is because we are merging schemas into publishing api.
- Update path of allowed_document_types.yml to reflect new location in publishing api, allowing us to remove a symlink.
- Introduce a setter method for manually configuring the path to schemas, outside of an env variable
- Fix
Validator
module to handle JSON or other object types being passed as the payload (#68)
- Adds support for applications that use Minitest by adding an
AssertMatchers
module (#66)
- Generate unique items for arrays with the "uniqueItems" property. (#63)
- Add support for generating random HH:MM time strings that match a regex. (#62)
- Fix RandomSchemaGenerator.new always returning equivalent generators (#60)
- Add
seed
parameter toGovukSchemas::RandomExample
to make the random behaviour deterministic. Given the same seed, the same randomised outputs will be returned (#56).
- Bump the required Ruby version to >= 2.6.x.
- Change RSpec::Matchers, rename
be_valid_against_schema
tobe_valid_against_publisher_schema
and addbe_valid_against_frontend_schema
plusbe_valid_against_notification_schema
.
- Support generating objects with an
oneOf
property.
- Add
GovukSchemas::DocumentTypes.valid_document_types
(PR #48)
- Update json-schema dependency
- Change order of output when validation errors occur during random example generation
- Move to block based customisation of randomly generated payloads. This removes the existing methods:
customise_and_validate
andmerge_and_validate
. In additionGovukSchemas::RandomExample.for_schema(schema)
now returns the payload hash directly.
- Allow looking up examples to work with schemas stored in
formats/{format}/{schema_type}/examples/
andexamples/{format}/{schema_type}/
to allow schema examples to move.
- Add RSpec test helpers
- Add
customise_and_validate
to bring the functionality to remove fields from a payload which has been generated as a random example
- Support for a new regex in GOV.UK content schemas
- Add
Schema.schema_names
to return all schema names - Add functionality to work with examples
- Change GovukSchemas::Schema.find to take { links_schema: 'detailded_guide' }
- Add regex for lowercase-underscore strings
- Add regex for GOV.UK campaign URLs
- Improve error messages
- Add a new regex for the new application validation in the schema
- Add documentation for the gem
- Fixes a problem with an infinite loop in a certain schema
- Now tests all available schema (a problem with specialist docs has been solved)
- Drops active-support dependency, pins json-schema dependency
- First release. Allows random content generation.