Skip to content

fixes for multiple documents #73

@karenetheridge

Description

@karenetheridge

A few places make assumptions that we are only ever working with one document. But actually a $ref can point to an entity in another document entirely.

Most ref resolutions work properly, updating $state with the proper base uri, as we use JSON Schema semantics and its helper subs to work with references. However some issues remain:

  • operationId and operationId_path is on the document, not the openapi object
    • operation ids could conceivably be duplicated across multiple documents when loaded, and this should result in an error when the second document is loaded;
    • when working with a user-provided operationId, we should check the indexes of all loaded documents for this operationId, not just our own (this will require a new helper method)
    • operationId_path is used verbatim in 'schema_path', which is supposed to contain a chain of $refs if references were followed to reach the path-item - so this will break even with a single document if the path to the path-item contains a $ref.

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec supportsomething that the spec says should be supported

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions