[FOLIO-3560] Erroneous api-lint validation for mod-patron with new AMF dependency Created: 22/Aug/22  Updated: 26/Oct/22  Resolved: 26/Oct/22

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

Type: Task Priority: TBD
Reporter: David Crossley Assignee: David Crossley
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to FOLIO-3553 Upgrade amf-client-js to v5.2.0 for a... Closed
Sprint: DevOps Sprint 146, DevOps Sprint 149, DevOps Sprint 150, DevOps Sprint 151
Development Team: FOLIO DevOps
RCA Group: TBD

 Description   

Each time that we upgrade the api-lint dependency "amf-client-js" we do local testing of all back-end modules. With the recent FOLIO-3553 Closed this was okay for all modules except mod-patron and edge-patron, despite there being no git changes to their sources.

So it is likely an upstream issue.

Raised a ticket at AMF: https://github.com/aml-org/amf/issues/1551



 Comments   
Comment by David Crossley [ 22/Aug/22 ]
---- validationResult:
ModelId: file://./ramls/patron.raml
Profile: RAML 1.0
Conforms: false
Number of results: 1

Level: Violation

- Constraint: http://a.ml/vocabularies/amf/validation#example-validation-error
  Message: charges[0].chargeAmount should NOT have additional properties
charges[0].chargeAmount should have required property 'charges'
charges[0].chargeAmount should have required property 'holds'
charges[0].chargeAmount should have required property 'loans'
charges[0].chargeAmount should have required property 'totalCharges'
charges[0].chargeAmount should have required property 'totalChargesCount'
charges[0].chargeAmount should have required property 'totalHolds'
charges[0].chargeAmount should have required property 'totalLoans'
charges[0].item should NOT have additional properties
charges[0].item should have required property 'charges'
charges[0].item should have required property 'holds'
charges[0].item should have required property 'loans'
charges[0].item should have required property 'totalCharges'
charges[0].item should have required property 'totalChargesCount'
charges[0].item should have required property 'totalHolds'
charges[0].item should have required property 'totalLoans'
holds[0].item should NOT have additional properties
holds[0].item should have required property 'charges'
holds[0].item should have required property 'holds'
holds[0].item should have required property 'loans'
holds[0].item should have required property 'totalCharges'
holds[0].item should have required property 'totalChargesCount'
holds[0].item should have required property 'totalHolds'
holds[0].item should have required property 'totalLoans'
loans[0].item should NOT have additional properties
loans[0].item should have required property 'charges'
loans[0].item should have required property 'holds'
loans[0].item should have required property 'loans'
loans[0].item should have required property 'totalCharges'
loans[0].item should have required property 'totalChargesCount'
loans[0].item should have required property 'totalHolds'
loans[0].item should have required property 'totalLoans'

  Severity: Violation
  Target: file://./ramls/patron.raml#/web-api/endpoint/%2Fpatron%2Faccount%2F%7Bid%7D/supportedOperation/get/returns/resp/200/payload/application%2Fjson/shape/schema/examples/example/default-example
  Property: file://./ramls/patron.raml#/web-api/endpoint/%2Fpatron%2Faccount%2F%7Bid%7D/supportedOperation/get/returns/resp/200/payload/application%2Fjson/shape/schema/examples/example/default-example
  Range: [(1,0)-(56,1)]
  Location: file://./ramls/examples/account.json
 

Doing independent assessment with z-schema shows no problem.

z-schema --pedanticCheck account.json examples/account.json
schema validation passed
json #1 validation passed

Comment by David Crossley [ 30/Aug/22 ]

The issue was acknowledged upstream.

Our FOLIO-3553 Closed upgrade to AMF v5.0.11 was reverted.

Comment by David Crossley [ 01/Sep/22 ]

Blocked awaiting the upstream ticket AMF 1551.

Comment by David Crossley [ 22/Sep/22 ]

The upstream AMF 1551 ticket has a fix. Will be in the next release, due around October 19.

Comment by David Crossley [ 26/Oct/22 ]

Via FOLIO-3553 Closed upgraded to AMF "amf-client-js" v5.2.0

All okay now.

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