Skip to content

dereference works different in node and browser environment #364

Open
@sathish2017

Description

@sathish2017
  1. Resolve and dereference works as expected in node js env. But for browser environment $id is expected to be a url in my case it's custom path which will get resolved by configuring resolvers, for $ref cases even after resolving with custom resolvers, a separate call has been made again with path value in $id. Since value in $id is not a complete http url, it gets failed at that time.

Only way to make it work proper is to make $id as full complete path to json.

  1. Also for base schema passed to dereference method is also loaded in resolver with $id value, since I have passed complete base schema as obj why would it make http call again with $id attr of base schema.

  2. Also in browser env, some times it throws process not found error. When I bundle with webpack again it gets resolved, but same issue occurs later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions