[FOLIO-912] Improve configuration for RAML schema collection Created: 26/Oct/17 Updated: 18/Jan/19 |
|
| Status: | Open |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | David Crossley | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | raml | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||
| Sprint: | |||||||||
| Development Team: | Core: Platform | ||||||||
| Description |
|
Clarify the advice for configuration of schema collections. |
| Comments |
| Comment by David Crossley [ 26/Oct/17 ] |
|
We have the configuration advice (RMB readme section 6):
That has been applied to all of the existing mod-* projects, and is working fine. That advice is for a "schemaItem". For a "schemaCollection", the schema key name does not have the filename extension. So the following example for mod-notes note.raml schemas: - note.json: !include note.json - noteCollection: !include noteCollection.json The RMB's jsonschema2pojo generates the class names "Note" and "NoteCollection". If instead this was the configuration: schemas: - note.json: !include note.json - noteCollection.json: !include noteCollection.json Then the generated class names would be "Note" and "NoteCollectionJson". I presume that we do not want that. There is a "note" at the RMB section 6 to try to explain that. However i have seen people still confused about the configuration. Perhaps enhance the notes. Perhaps it would help to group the schema declarations in the RAML into schemaItems and schemaCollections. The name used to declare a schemaCollection defines its Java class name. The name used to declare a schemaItem correlates with that used in its $ref in the collection schema. |