[FOLIO-1220] Ensure that all necessary schemas are declared in RAML files Created: 23/Apr/18 Updated: 12/Nov/18 Resolved: 21/Aug/18 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | P3 |
| Reporter: | David Crossley | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | raml | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 4 hours, 55 minutes | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||||||
| Sprint: | |||||||||||||||||||||
| Description |
|
One example: For any raml file that uses the "validate" trait, that validation.raml file refers to the "errors" schema. Therefore that errors.schema must be declared in the top-level raml file. Then raml-cop (and any other raml tool that uses the underlying parser) is happy because it can find the error.schema that is referenced from the errors.schema and it can find the parameters.schema that is referenced from error.schema, as they are relative to their parent schema. However a supporting library inside the RMB does need the additional error.schema and parameters.schema to be excplicitly declared in the top-level raml file. Now a couple of wrinkles: A) If RMB is processing a group of raml files, one of them might neglect to declare those schema. If a raml file that was processed earlier did declare them, then they would have been copied to the temp space. Then this latterly processed raml would be able to find the copies. It would seem that all is well. However if the raml files are processed in a different order on another machine (e.g.
B) When that supporting library copies those schema to the temp space, if a schema reference uses '../' dot-dot in the pathname, then that schema will be copied one directory level up and so outside of its temp space. When processing is finished, the RMB does remove the temp directory. However it does not remove those extraneous ones outside the temp space (
|
| Comments |
| Comment by David Crossley [ 21/Aug/18 ] |
|
This was already done for current mod_* modules. With RMB v20 (
|