-
Notifications
You must be signed in to change notification settings - Fork 11
Render alpha notice on routes and endpoints #642
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
Render alpha notice on routes and endpoints #642
Conversation
razor-x
commented
Jun 11, 2025
- Add alpha notice
- Test alpha message
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.
Also, I was just about to comment on the extra blank line, but then you beat me to fixing in!
@@ -0,0 +1,3 @@ | |||
{% hint style="info" %} | |||
**Alpha**. {{alphaMessage}} |
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.
@razor-x Using "alpha" implies that there's a specific meaning and that there's likely to be a "beta" later. Do we want to assume that we will add functionality for an analogous "beta" tag later on, or do we want to go with something more generic like "preview" or, perhaps better, "prerelease"?
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.
@DebbieAtSeam I removed the "Alpha" prefix. We can just use alpha
as the property for now, and put whatever we want in the message.
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.
OK
@@ -7,6 +7,7 @@ export const PathMetadataSchema = z.record( | |||
resources: z.array(z.string()).default([]), | |||
description: z.string().trim().min(1).optional(), | |||
overview: z.string().trim().min(1).optional(), | |||
alpha: z.string().trim().min(1).optional(), |
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.
If we only need one label, let's use preview or early_access. Then, please see my other suggestions.
alpha: z.string().trim().min(1).optional(), | |
early_access: z.string().trim().min(1).optional(), |
{{#if isAlpha}} | ||
{{> alpha-notice}} | ||
{{/if}} |
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.
{{#if isAlpha}} | |
{{> alpha-notice}} | |
{{/if}} | |
{{#if isEarlyAccess}} | |
{{> early-access-notice}} | |
{{/if}} |
src/data/paths.yaml
Outdated
@@ -62,6 +62,7 @@ | |||
/thermostats: | |||
title: Thermostats | |||
resources: [] | |||
alpha: 'This API is in Alpha, please give us feedback.' |
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.
alpha: 'This API is in Alpha, please give us feedback.' | |
early_access: '**Alpha**. This API is in Alpha, please give us feedback.' |
{{#if isAlpha}} | ||
{{> alpha-notice}} | ||
{{/if}} |
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.
{{#if isAlpha}} | |
{{> alpha-notice}} | |
{{/if}} | |
{{#if isEarlyAccess}} | |
{{> early-access-notice}} | |
{{/if}} |
{{#if isAlpha}} | ||
{{> alpha-notice}} | ||
{{/if}} |
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.
{{#if isAlpha}} | |
{{> alpha-notice}} | |
{{/if}} | |
{{#if isEarlyAccess}} | |
{{> early-access-notice}} | |
{{/if}} |
file.isAlpha = (metadata.alpha ?? '').length > 0 | ||
file.alphaMessage = metadata.alpha |
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.
file.isAlpha = (metadata.alpha ?? '').length > 0 | |
file.alphaMessage = metadata.alpha | |
file.isEarlyAccess = (metadata.early_access ?? '').length > 0 | |
file.earlyAccessMessage = metadata.early_access |
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.
or is the metadata tag supposed to be earlyAccess, not early_access?
isAlpha: boolean | ||
alphaMessage: string | undefined |
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.
isAlpha: boolean | |
alphaMessage: string | undefined | |
isEarlyAccess: boolean | |
earlyAccessMessage: string | undefined |
file.isAlpha = (metadata.alpha ?? '').length > 0 | ||
file.alphaMessage = metadata.alpha |
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.
file.isAlpha = (metadata.alpha ?? '').length > 0 | |
file.alphaMessage = metadata.alpha | |
file.isEarlyAccess = (metadata.early_access ?? '').length > 0 | |
file.earlyAccessMessage = metadata.early_access |
isAlpha: boolean | ||
alphaMessage: string | undefined |
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.
isAlpha: boolean | |
alphaMessage: string | undefined | |
isEarlyAccess: boolean | |
earlyAccessMessage: string | undefined |
file.isAlpha = (metadata.alpha ?? '').length > 0 | ||
file.alphaMessage = metadata.alpha |
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.
file.isAlpha = (metadata.alpha ?? '').length > 0 | |
file.alphaMessage = metadata.alpha | |
file.isEarlyAccess = (metadata.early_access ?? '').length > 0 | |
file.earlyAccessMessage = metadata.early_access |