-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom headers for meta-schemas #200
Conversation
Deploying with
|
Latest commit: |
0b6aef0
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ef9b8fdf.website-2v2.pages.dev |
Branch Preview URL: | https://meta-schema-headers.website-2v2.pages.dev |
It appears that Cloudflare is having issues deploying the preview. I don't believe there's any way to test these changes other than with the preview. |
The deploy seems to have worked now, but it doesn't work.
May have to list out the drafts. OR, we may be able to use placeholders for the last part of the path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per above comment. Does not seem to work. Cann't use multiple splats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this great work. Just left a small suggestion to cover a missing case.
Cache-Control: public, max-age=31536000, immutable | ||
|
||
# Output Schemas | ||
/draft/:draft/output/*schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/draft/:draft/output/*schema | |
/draft/:draft/output/* |
I'll suggest this modification to cover "/draft/2019-09/output/verbose-example" and "/draft/2020-12/output/verbose-example"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"verbose-example" doesn't belong because it's not a schema. It's example output for the verbose output format.
Given the recent plan/agreement to modify the meta-schemas to remove unused/nonsensical use of |
"immutable" tells caches not to request the resource while the cached version is still fresh. It's not forever. in this case, "max-age" determines how long the cache should consider the resource "fresh". If we want to account for changes to the schema, we can make "max-age" smaller. Perhaps a week or a month is appropriate. |
Please, let's use the recommendation for non-breaking changes I added in this proposal for deprecation process. |
@benjagm, should I take a stab at writing up the announcement, or do you want to do that? |
If you can start with it, that would be great. Thanks! |
e635934
to
0b6aef0
Compare
On further thought, I do think a very long cache is appropriate. Changes to meta-schemas are rare, especially for older versions. When they do happen, it's to fix a bug in a recently released version. We don't have anything in that category right now. I think it's reasonable to have a shorter cache for a new release, but that's not necessary for anything we have now. This recent change is unusual in that I don't think we've ever changed a meta-schema just to do some inconsequential cleanup and I don't expect it's likely to happen often, if ever again. But if it does happen, it's not a big deal if people have the old version cached because the only thing that changed was cosmetic. We would never change the behavior of a released meta-schema, so there's no practical difference between the old and the new. If for some reason there is a change where something is broken in the old version, the new version can be retrieved by either clearing cache or sending a |
@benjagm, how's this? I think we should get the announcement out ASAP since there's such a long lead time before we can actually merge.
|
This is perfect. I'll send it today. |
Resolves #199