Skip to content

Conversation

@too-soon
Copy link

@too-soon too-soon commented Mar 28, 2023

Possibly fixes #40

This PR is just for demonstration and will be deleted later.

};

const relationships = Object.keys(relationsField).reduce((acum, item) => {
if (
Copy link
Owner

@klerick klerick Mar 29, 2023

Choose a reason for hiding this comment

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

I think, better use json schema validate uuid.
You can use additional conditional before get from metadata information about ID.
like this:

if(isUuid){ relDataType.properties.data.properties.id.pattern = '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' relDataType.properties.data.properties.id.minLength = 36 relDataType.properties.data.properties.id.maxLength = 36 } 

so, before it, not need check in pipe

Copy link
Author

Choose a reason for hiding this comment

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

Awesome, I'll update my proposal later this week.

@too-soon
Copy link
Author

Closed in favour of #41

@too-soon too-soon closed this Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants