-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add acceptance test for correct format on date fields #18741
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
Comments
@timroes as far as I understand, the current state is:
I think you're asking for:
What I think you're trying to get to is "If something should explicitly be a date, it needs to be marked with the Here's what I'd suggest:
|
There is nothing in the frontend that would "set" the
My idea was that it seems those fields are sometimes just missed by accident (no matter how good the documentatin), so having the SAT is just a layer to make sure, those are not forgotten (same as e.g. other SAT tests for duplicate
I don't see where this could be the case (at least for |
I'm not sure I follow this to be honest. The |
We unfortunately don't have that documented at the moment, which JSONSchema values are actually supported in the UI anywhere explicitally. I think it would be a valid task to document the exact supported features somewhere, to make it easier to see. (cc @lmossman) That said, we should ideally use in the spec whatever JSONSchema makes sense, and if the UI doesn't support it yet, we should build that support. |
Makes sense 👍🏻
Cool, I had no idea! This seems like something else we can enforce ourselves, we just need to document that. I was looking at the metaschema, which doesn't include it, because the validation doc has it as a
If the property is already annotated with However I do think it makes sense to, when we start using |
I agree, I'd be happy to make a more general issue collaborating with your team on it - I mentioned it in my PR here |
@erohmensing If you could create an issue to capture which information is needed from the frontend, with the labels |
Definitely a nice to have, low prio :) more of a question of catching things we want to enforce before we run into them -- so understanding what should be enforced based on the expected frontend experience For example: lists shouldn't have duplicates; if a list has a default value, the list also needs to have a "default" option (or maybe that is something that the frontend should infer via there being a default value, and adding that option instead? multiple ways to do something, but looking at those rules makes us sure that we've made conscious decisions about them) |
@timroes I'd propose closing this in favor of airbytehq/airbyte-internal-issues#1129 where we would define all of the restrictions we want to SAT test. Sound good? |
If the goal is to mark any properties that have those regexes as |
We currently don't set the
format
property on alltype: string
fields in connectors that accept a date. Theformat
property has currently no effect, but will be once we have date pickers in the UI, since it's the one determining if a string field is actually a date.We should add an acceptance test, that tests that:
a) if a
type: string
field has the pattern^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$
, that it must also have aformat: date-time
b) if a
type: string
field has the pattern^[0-9]{4}-[0-9]{2}-[0-9]{2}$
, it must also haveformat: date
The text was updated successfully, but these errors were encountered: