Skip to content

Commit c5c07d2

Browse files
Vladimir Kotalahornace
authored andcommitted
update the file content documentation
notably the possible error codes and content types
1 parent 2bcacab commit c5c07d2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

apiary.apib

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,14 @@ unless authentication bearer tokens are configured in the web application and us
9898

9999
### get file content [GET]
100100

101-
Honors the Accept header. The text type works for plain text files only.
101+
Honors the `Accept` header. If the value of the header is set to `text/plain`
102+
and there is a document in the index that has the genre detected as plain text,
103+
the contents of the document will be returned. If the document is not found,
104+
HTTP error 404 will be returned. If the genre of the document is not plain text,
105+
HTTP error 406 will be returned.
106+
Alternatively, one can use the `application/octet-stream` value of the header
107+
which bypasses the document and genre check.
108+
The `Content-type` header of the reply will be set accordingly.
102109

103110
+ Parameters
104111
+ path (string) - path of file, relative to source root
@@ -109,7 +116,7 @@ Honors the Accept header. The text type works for plain text files only.
109116
foo
110117
bar
111118

112-
+ Response 200 (application/octet-stream)
119+
+ Response 200
113120

114121
## File genre [/file/genre{?path}]
115122

0 commit comments

Comments
 (0)