OCR-D / spec

Specification of the @OCR-D technical architecture, interface definitions and data exchange format(s)
https://ocr-d.de/en/spec/
17 stars 5 forks source link

webapi-spec: content of put/post for workspaces #209

Closed joschrew closed 2 years ago

joschrew commented 2 years ago

In my opinion the content/body for post and put a workspace have to be the same. But I'm not 100 % sure how to define them. I read this https://swagger.io/docs/specification/describing-request-body/file-upload/ and that: https://stackoverflow.com/questions/14455408/how-to-post-files-in-swagger-openapi. I want to use WorkspaceRequest defined in component.schema, but I think the json-part should be left out. So this PR is what I came up with.

joschrew commented 2 years ago

I am not really sure if i have done it right but i definitely think the bodies of put and post have to be equal. At least someone has to convince me that I am wrong.

joschrew commented 2 years ago

Ok, thank you. I now updatet the PR to what I think it should look like regarding the post end put request. As you said I (really) would prefer a simple file upload for both methods without additional json. Thanks for pointing out how to view the api online, it helped me.