Skip to content
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

Consider defining a URL type #400

Open
mbrush opened this issue Mar 9, 2023 · 2 comments
Open

Consider defining a URL type #400

mbrush opened this issue Mar 9, 2023 · 2 comments

Comments

@mbrush
Copy link
Collaborator

mbrush commented Mar 9, 2023

There are several fields in the schema that take urls, which are defined using a string data type, and informally described as taking a url. Consider if TRAPI wants to define a dedicated URL type as it does for CURIE- which would allow additional constraint and validation on values.

Also, there is no regex pattern defined for the CURIE type - which could be useful for validation of fields taking curies.

@mbrush
Copy link
Collaborator Author

mbrush commented Mar 9, 2023

Not sure there are any use cases for it currently, but a uriorcurie types may also be useful for fields that can take a uri/url or a curie (analogous to the biolink:uriorcurie type

@edeutsch
Copy link
Collaborator

There are several fields in the schema that take urls, which are defined using a string data type, and informally described as taking a url. Consider if TRAPI wants to define a dedicated URL type as it does for CURIE- which would allow additional constraint and validation on values.

sounds like a good idea to me. Care to make a PR?

Also, there is no regex pattern defined for the CURIE type - which could be useful for validation of fields taking curies.

sounds good to me. Care to make a PR? I don't know quite what such a regex would look like. I googled around a little and came up with this, but this doesn't seem appropriate:
https://gist.github.com/niklasl/2506955

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

No branches or pull requests

2 participants