mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 04:38:47 +08:00
DEV: Correctly tag heredocs (#16061)
This allows text editors to use correct syntax coloring for the heredoc sections. Heredoc tag names we use: languages: SQL, JS, RUBY, LUA, HTML, CSS, SCSS, SH, HBS, XML, YAML/YML, MF, ICS other: MD, TEXT/TXT, RAW, EMAIL
This commit is contained in:
@ -20,7 +20,7 @@ describe 'groups' do
|
||||
in: :query,
|
||||
type: :string,
|
||||
example: 'api @blake #support tags:api after:2021-06-04 in:unseen in:open order:latest_topic',
|
||||
description: <<~HEREDOC
|
||||
description: <<~MD
|
||||
The query string needs to be url encoded and is made up of the following options:
|
||||
- Search term. This is just a string. Usually it would be the first item in the query.
|
||||
- `@<username>`: Use the `@` followed by the username to specify posts by this user.
|
||||
@ -44,7 +44,7 @@ describe 'groups' do
|
||||
curl -i -sS -X GET -G "http://localhost:4200/search.json" \\
|
||||
--data-urlencode 'q=wordpress @scossar #fun after:2020-01-01'
|
||||
```
|
||||
HEREDOC
|
||||
MD
|
||||
)
|
||||
parameter name: :page, in: :query, type: :integer, example: 1
|
||||
|
||||
|
@ -52,7 +52,7 @@ describe 'uploads' do
|
||||
tags 'Uploads'
|
||||
operationId 'generatePresignedPut'
|
||||
consumes 'application/json'
|
||||
description <<~HEREDOC
|
||||
description <<~TEXT
|
||||
Direct external uploads bypass the usual method of creating uploads
|
||||
via the POST /uploads route, and upload directly to an external provider,
|
||||
which by default is S3. This route begins the process, and will return
|
||||
@ -66,7 +66,7 @@ describe 'uploads' do
|
||||
destination in the external storage service.
|
||||
|
||||
#{direct_uploads_disclaimer}
|
||||
HEREDOC
|
||||
TEXT
|
||||
|
||||
expected_request_schema = load_spec_schema('upload_generate_presigned_put_request')
|
||||
parameter name: :params, in: :body, schema: expected_request_schema
|
||||
@ -108,7 +108,7 @@ describe 'uploads' do
|
||||
tags 'Uploads'
|
||||
operationId 'completeExternalUpload'
|
||||
consumes 'application/json'
|
||||
description <<~HEREDOC
|
||||
description <<~TEXT
|
||||
Completes an external upload initialized with /get-presigned-put. The
|
||||
file will be moved from its temporary location in external storage to
|
||||
a final destination in the S3 bucket. An Upload record will also be
|
||||
@ -119,7 +119,7 @@ describe 'uploads' do
|
||||
file was uploaded. The file size will be compared for the same reason.
|
||||
|
||||
#{direct_uploads_disclaimer}
|
||||
HEREDOC
|
||||
TEXT
|
||||
|
||||
expected_request_schema = load_spec_schema('upload_complete_external_upload_request')
|
||||
parameter name: :params, in: :body, schema: expected_request_schema
|
||||
@ -154,12 +154,12 @@ describe 'uploads' do
|
||||
tags 'Uploads'
|
||||
operationId 'createMultipartUpload'
|
||||
consumes 'application/json'
|
||||
description <<~HEREDOC
|
||||
description <<~TEXT
|
||||
Creates a multipart upload in the external storage provider, storing
|
||||
a temporary reference to the external upload similar to /get-presigned-put.
|
||||
|
||||
#{direct_uploads_disclaimer}
|
||||
HEREDOC
|
||||
TEXT
|
||||
|
||||
expected_request_schema = load_spec_schema('upload_create_multipart_request')
|
||||
parameter name: :params, in: :body, schema: expected_request_schema
|
||||
@ -200,7 +200,7 @@ describe 'uploads' do
|
||||
tags 'Uploads'
|
||||
operationId 'batchPresignMultipartParts'
|
||||
consumes 'application/json'
|
||||
description <<~HEREDOC
|
||||
description <<~TEXT
|
||||
Multipart uploads are uploaded in chunks or parts to individual presigned
|
||||
URLs, similar to the one generated by /generate-presigned-put. The part
|
||||
numbers provided must be between 1 and 10000. The total number of parts
|
||||
@ -215,7 +215,7 @@ describe 'uploads' do
|
||||
because this is needed to complete the multipart upload.
|
||||
|
||||
#{direct_uploads_disclaimer}
|
||||
HEREDOC
|
||||
TEXT
|
||||
|
||||
expected_request_schema = load_spec_schema('upload_batch_presign_multipart_parts_request')
|
||||
parameter name: :params, in: :body, schema: expected_request_schema
|
||||
@ -255,13 +255,13 @@ describe 'uploads' do
|
||||
tags 'Uploads'
|
||||
operationId 'abortMultipart'
|
||||
consumes 'application/json'
|
||||
description <<~HEREDOC
|
||||
description <<~TEXT
|
||||
This endpoint aborts the multipart upload initiated with /create-multipart.
|
||||
This should be used when cancelling the upload. It does not matter if parts
|
||||
were already uploaded into the external storage provider.
|
||||
|
||||
#{direct_uploads_disclaimer}
|
||||
HEREDOC
|
||||
TEXT
|
||||
|
||||
expected_request_schema = load_spec_schema('upload_abort_multipart_request')
|
||||
parameter name: :params, in: :body, schema: expected_request_schema
|
||||
@ -299,7 +299,7 @@ describe 'uploads' do
|
||||
tags 'Uploads'
|
||||
operationId 'completeMultipart'
|
||||
consumes 'application/json'
|
||||
description <<~HEREDOC
|
||||
description <<~TEXT
|
||||
Completes the multipart upload in the external store, and copies the
|
||||
file from its temporary location to its final location in the store.
|
||||
All of the parts must have been uploaded to the external storage provider.
|
||||
@ -307,7 +307,7 @@ describe 'uploads' do
|
||||
to its final location.
|
||||
|
||||
#{direct_uploads_disclaimer}
|
||||
HEREDOC
|
||||
TEXT
|
||||
|
||||
expected_request_schema = load_spec_schema('upload_complete_multipart_request')
|
||||
parameter name: :params, in: :body, schema: expected_request_schema
|
||||
|
Reference in New Issue
Block a user