Skip to content

File Input Schema - 'null' type for files #210

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

Closed
lmperry opened this issue Mar 18, 2016 · 4 comments
Closed

File Input Schema - 'null' type for files #210

lmperry opened this issue Mar 18, 2016 · 4 comments
Assignees
Labels

Comments

@lmperry
Copy link
Member

lmperry commented Mar 18, 2016

Currently when uploading files at the acquisition level, files that do not have a type set are rejected and the folder_reaper is halted.

The current "fix", in place on the deployed instances, is for:
"type": { "type": "string" },

to become:

"type": { "type": ["string", "null"] },

https://github.com/scitran/core/blob/master/api/schemas/input/file.json#L6

Other thoughts on how to handle this?

@kofalt
Copy link
Contributor

kofalt commented Mar 23, 2016

Tagging @rentzso and @gsfr for comment on this.

@gsfr
Copy link
Member

gsfr commented Mar 23, 2016

We may simply not always know the type. null seems fine. UI needs to handle appropriately, of course.

@nagem
Copy link
Contributor

nagem commented May 10, 2016

@gsfr this should be fixed with scitran/reaper@29db44c, correct?

Closing this ticket if so.

@gsfr
Copy link
Member

gsfr commented May 11, 2016

Yes, closing.

We still need a larger discussion on how we want our schemas to behave. To me, it seems annoying that I'm not allowed to send null for a non-required field. More importantly, though, we need our schemas to behave consistently and predictably across the entire app.

@gsfr gsfr closed this as completed May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants