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

DCAT-US Validator Feature: Raw JSON #4003

Open
1 task
jbrown-xentity opened this issue Oct 10, 2022 · 1 comment
Open
1 task

DCAT-US Validator Feature: Raw JSON #4003

jbrown-xentity opened this issue Oct 10, 2022 · 1 comment

Comments

@jbrown-xentity
Copy link
Contributor

User Story

In order to evaluate string input DCAT-US, data.gov admins want an input field for raw JSON string to be evaluated against the DCAT-US schema.

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • GIVEN a DCAT-US provider has JSON as a string
    WHEN a request is submitted to evaluate this string
    THEN the string is evaluated against the DCAT-US schema

Background

#3503 (comment)
https://dashboard.data.gov/validate compared to https://catalog.data.gov/dcat-us/validator

Security Considerations (required)

Need to take care with anything loaded by the public, but nothing is "executed" or "evaluated" other than as strings against previously defined regex. This should be a no-op.

Sketch

The current validator already makes a post request, so it shouldn't be a lot of work to have the form send the string input in the post, and parse that directly (instead of sending the URL, requesting the URL in python and then evaluating, just directly evaluating the sent string)...

@jbrown-xentity
Copy link
Contributor Author

I cannot tell how often this is used via New Relic logs, but I do know that there were 70K requests to validate a DCAT-US file at a public URL for September (search gsa-datagov.prod.dashboard validate datajson_url in New Relic) versus 11,590 requests to validate a DCAT-US file with either raw JSON or loading a file (search gsa-datagov.prod.dashboard validate POST -datajson_url).
So the feature requested above represents < 14% (say half, roughly 7%) of the total validator usage on dashboard.

@hkdctol hkdctol moved this to 🧊 Icebox in data.gov team board May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🧊 Icebox
Development

No branches or pull requests

1 participant