Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Redirect unversioned meta-schemas #300

Merged
merged 3 commits into from
Nov 13, 2019

Conversation

handrews
Copy link
Contributor

@handrews handrews commented Oct 30, 2019

This replaces these with HTML stubs that will use a meta refresh
tag and canonical link to perform a redirect.

If there's code out there assuming that these exist and are JSON,
then that code will be confused by receiving HTML. Although we do
say that you can't assume these things are actually hosted.
Not sure this is what anyone had in mind, though.

Also explain the redirects some in the template, because
some of it is weird, and when redirecting for the JSON
files, getting HTML is surprising.

Also, as an example of this problem, the tests of the examples
against the meta-schema were failing because they were using
the unversioned meta-schema, which of course no longer makes
sense as neither the examples nor the validator have been updated.

This replaces these with HTML stubs that will use a meta refresh
tag and canonical link to perform a redirect.

If there's code out there assuming that these exist and are JSON,
then that code will be confused by receiving HTML.  Although we do
say that you can't assume these things are actually hosted.
Not sure this is what anyone had in mind, though.
Because some of it is weird, and when redirecting for the JSON
files, getting HTML is surprising.
@netlify
Copy link

netlify bot commented Oct 30, 2019

Deploy preview for condescending-hopper-c3ed30 ready!

Built with commit 7d53bd2

https://deploy-preview-300--condescending-hopper-c3ed30.netlify.com

This is an excellent example of why using the unversioned schema
URI / path is a bad idea.
@handrews
Copy link
Contributor Author

@Relequestual any idea why the Travis job is showing up as incomplete? It looks like it completed successfully when I click through to Details.

@handrews
Copy link
Contributor Author

The deployment on netlify works fine (and handles the JSON better, too!).

@Relequestual
Copy link
Member

@handrews Not a clue. I've triggered a rebuild. See if that fixes it =/

@Relequestual
Copy link
Member

The deployment on netlify works fine (and handles the JSON better, too!).

Why do you think I'm so keen we move to netlify?

Copy link
Member

@Relequestual Relequestual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I <3 Netlify PR previews!

@handrews
Copy link
Contributor Author

@awwright any thoughts on this? @Relequestual approved it, if I don't hear from you after a couple more days I'll merge this.

Copy link
Member

@awwright awwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good way to handle this

@handrews handrews merged commit f5038e6 into json-schema-org:master Nov 13, 2019
@handrews handrews deleted the schema-redirect branch December 30, 2019 21:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants