[FOLIO-1399] Improve lint-raml to handle RMB v20+ schema $ref as key names Created: 06/Aug/18  Updated: 12/Nov/18  Resolved: 16/Aug/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: David Crossley Assignee: David Crossley
Resolution: Done Votes: 0
Labels: ci, core, raml, sprint44
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Blocks
blocks FOLIO-1027 Integrate RAML linting for all raml-b... Closed
blocks UXPROD-1046 RAML 1.0 platform support Closed
is blocked by RMB-203 $ref should follow the JSON schema spec Closed
Relates
relates to FOLIO-573 Use a consistent method for RAML to r... Closed
relates to FOLIO-1264 Add folio-tools/lint-raml Closed
relates to RMB-109 RAML 1.0 support: use raml-for-jax-rs... Closed
Sprint:

 Description   

The script folio-tools/lint-raml/lint_raml_cop.py does already handle "RAML 1.0" as well as "RAML 0.8".

The new RMB v20 ( RMB-109 Closed ) uses "RAML 1.0" only.

Its dependencies still utilise the schema key names declared in the RAML files as the $ref value to link a parent JSON schema to another schema. However now it does not allow those $ref values to be a filename or relative pathname.

So the lint_raml_cop.py independent verification script needs to continue to handle our previous style of $ref using pathnames ( FOLIO-573 Closed ), as well as now the key names.



 Comments   
Comment by Mike Taylor [ 06/Aug/18 ]

If I rightly understand the implications here, we are actively moving away from what the JSON Schema standards specifies.

And this means that our actual JSON Schemas are likely to become more and more standards-non-conformant, which means that mod-graphl's JSON Schema handling code won't be able to use standard tools.

Am I missing something?

Comment by David Crossley [ 07/Aug/18 ]

This is the way that the RMB’s dependencies (raml-for-jax-rs and jsonschema2pojo) operate – an implementation-specific technique. This is the way that it was with the original RMB because of those dependencies. Then with FOLIO-573 Closed we found a standard way to address that, using the relative pathnames, so that all raml-related tools could operate.

There are some comments in RMB-109 Closed and FOLIO-573 Closed that have links to some remote issues regarding this.

This FOLIO-1399 Closed is just about handling either style of $ref for this validation script, and is not trying to address that wider issue.

Comment by Jakub Skoczen [ 08/Aug/18 ]

Guys, (adding Adam Dickmeiss) I wonder if we should investigate if it's possible to patch the library to allow $ref linking that is compliant with the JSON schema standard.

Comment by Adam Dickmeiss [ 16/Aug/18 ]

I don't think we need to do this anymore.. At least I can get stock raml-cop to pass RAML files with RMB-203 Closed .

Comment by David Crossley [ 16/Aug/18 ]

After the RMB-203 Closed fix, things are so much more simple. I can now remove much of the complex verification stuff from this script.

Generated at Thu Feb 08 23:13:03 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.