https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699
--- Comment #6 from Lari Taskula <[email protected]> --- Created attachment 52378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52378&action=edit Bug 16699: Support multiple types in primitive definitions Currently it is not possible to define multiple types for primitive definitions in /definitions/*. If you try to use the following "firstname": { "type": ["string", "null"], "description": "patron's first name" } in definitions.json, online.swagger.io validator will not validate it: {"messages":["attribute definitions.firstname.type is not of type `string`"]} One way to get around this issue is to extend definitions with custom "x-primitives" object, where we will define all reusable primitive definitions. To test: 1. Add the "firstname" example above to definitions.json 2. Run minifySwagger.pl 3. Validate your specification 4. Observe that error with description mentioned above is given 5. Apply patch 6. Repeat step 2 and 3 7. Observe that validation passes -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
