Skip to content

Conversation

@mmcorrelo
Copy link

When the schema id is defined with an URL should use that hostname to request the references, instead of using the current page URL

EXAMPLE:

{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://resourse.example.com/schemas/resources/main.json#", "title": "This is my main schema", "description": "This is my main schema description.", "type": "object", "properties": { "$ref": "/schemas/resources/version1.0.1.json#"	} }

Currently, if the dereference work is being done locally at http://localhost:3000 the deref request will be done with URL http://localhost:3000/schemas/resources/version.1.0.1.json instead of https://resourse.example.com/schemas/resources/version1.0.1.json

This is related to this issue

@philsturgeon
Copy link
Member

@Relequestual hey could I bother you for a quick check here? The issue is outlined in #199 and we want to make sure the case is even valid before merging this.

@philsturgeon
Copy link
Member

@mmcorrelo hey, sorry for being quiet on this, but it's come up a few times in conversations and I'd like to progress with it. Can you take the time to write some tests so we can see the change in behavior?

@jonluca jonluca closed this Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants