Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

III-4595 Shared models for common property schemas #102

Merged
merged 64 commits into from
Mar 3, 2022

Conversation

bertramakers
Copy link
Contributor

@bertramakers bertramakers commented Feb 21, 2022

Added

  • Added multiple schemas for common properties like name, address, description, priceInfo, bookingInfo, contactPoint, ...

Changed

  • Schemas from event, place, organizer now mostly use $refs to common schemas unless for very specific properties that are only available on one resource or deviate from other resources (for example terms.domain enum values is different on events vs places)
  • Marked read-only properties as readOnly
  • Marked internal schemas as x-internal: true

Fixed

  • name on priceInfo is now required for the tariff category
  • copyrightHolder on event.videos and place.videos now has the correct min/max length (2-250 vs 3-...)
  • copyrightHolder on organizer.images now has the correct min/max length (2-250 vs 3-...)
  • Added missing geo property to organizer
  • Fixed event.location, event.organizer, and place.organizer references
  • Occurrences of f.e. with e.g.

Note: We cannot mark readOnly properties as required at the moment (to indicate that they will always be included in responses), because if we do the opis/json-schema validator will throw an error that the properties are missing if they are not included in request bodies. I've opened an issue for that here: opis/json-schema#104

Ticket: https://jira.uitdatabank.be/browse/III-4595

Since a $ref can only be overwritten with a new description
This makes the validation of incoming requests fail if they are missing these, which should not be required when writing
@bertramakers bertramakers merged commit b04aff6 into unreleased Mar 3, 2022
@bertramakers bertramakers deleted the III-4595-models-for-properties branch March 3, 2022 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants