Skip to content

feat(next): Create x-jsf-ui alias to x-jsf-presentation #190

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sandrina-p
Copy link
Collaborator

@sandrina-p sandrina-p commented May 21, 2025

Create x-jsf-ui alias to x-jsf-presentation.

Why? Because it's easier/faster to write :D

const { minDate, maxDate } = schema['x-jsf-presentation']
// TODO: Why do we need to cast to JsfPresentation,
// even though we know it's not undefined (from the if above)?
const { minDate, maxDate } = getUiPresentation(schema) as JsfPresentation
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

help: tell me there's a better way :x

@@ -10,13 +10,13 @@ export function getErrorMessage(
validation: SchemaValidationErrorType,
customErrorMessage?: string,
): string {
const presentation = schema['x-jsf-presentation']
const presentation = getUiPresentation(schema)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lukad @dragidavid @antoniocapelo @eng-almeida from now on, let's remember to use this helper rather than typing directly x-jsf-presentation. I wish we had a linter against it... maybe one day ;)

@sandrina-p sandrina-p self-assigned this May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant