ZenWave360/json-schema-ref-parser-jvm

Referencing an external file from within a yaml

RanABI opened this issue · 0 comments

RanABI commented

Hi team,
Up until now I have used the resolver to resolve YAML file structured as a JSON Schema.
I would now like to add the ability to reference external files from within the YAML file.

info:
  title: My SQS service
  version: '1.0.0'
  description: Some description
resources:
  myQueue:
    ..
channels:
  profiles:
    publish:
      operationId: publishProfile
      messages:
        newDeviceDetectedV1:
          $ref: '#/components/schemas/testSchema'
...
components:
  schemas:
    testSchema:
      $ref: "schemas/test-schema.json"

Your README provides a partial example of referencing an external file.
My Q is - is it possible to pass a base path to the directory in which all the schemas reside in?
And is it possible to combine the resolving of both YAML file & schemas ref within?
There might be several references to several schemas within the YAML file.

Thanks!