Skip to content

Commit cb2e499

Browse files
committed
use simple quote and change tags
1 parent 47fc15d commit cb2e499

File tree

11 files changed

+86
-87
lines changed

11 files changed

+86
-87
lines changed

openapi_spec/parameters.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ AppId:
55
required: true
66
schema:
77
type: string
8-
pattern: "^(?:beta|testing)?[A-Z0-9]{10}$"
9-
example: "DJNVGS47DK"
8+
pattern: '^(?:beta|testing)?[A-Z0-9]{10}$'
9+
example: 'DJNVGS47DK'
1010
ApiKey:
1111
name: X-Algolia-API-Key
1212
in: header
1313
description: Algolia API key
1414
required: true
1515
schema:
1616
type: string
17-
pattern: "^[a-f0-9]{32}$"
18-
example: "43b15df305339e827f0ac0bdc5ebcaa7"
17+
pattern: '^[a-f0-9]{32}$'
18+
example: '43b15df305339e827f0ac0bdc5ebcaa7'
1919
IndexName:
2020
name: indexName
2121
in: path
2222
description: The index in which to perform the request
2323
required: true
2424
schema:
2525
type: string
26-
example: "myIndexName"
26+
example: 'myIndexName'

openapi_spec/paths/indexes/batch.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
post:
22
tags:
3-
- object
3+
- search
44
operationId: batch
55
summary: Performs multiple write operations in a single API call
66
parameters:
7-
- $ref: "../../parameters.yml#/AppId"
8-
- $ref: "../../parameters.yml#/ApiKey"
9-
- $ref: "../../parameters.yml#/IndexName"
7+
- $ref: '../../parameters.yml#/AppId'
8+
- $ref: '../../parameters.yml#/ApiKey'
9+
- $ref: '../../parameters.yml#/IndexName'
1010
requestBody:
1111
required: true
1212
content:
@@ -24,21 +24,21 @@ post:
2424
action:
2525
type: string
2626
enum:
27-
- "addObject"
28-
- "updateObject"
29-
- "partialUpdateObject"
30-
- "partialUpdateObjectNoCreate"
31-
- "deleteObject"
32-
- "delete"
33-
- "clear"
27+
- 'addObject'
28+
- 'updateObject'
29+
- 'partialUpdateObject'
30+
- 'partialUpdateObjectNoCreate'
31+
- 'deleteObject'
32+
- 'delete'
33+
- 'clear'
3434
description: type of operation
3535
body:
3636
type: object
3737
# this could be a long oneOf with every possibilities
3838
additionalProperties: true
3939
description: arguments to the operation (depends on the type of the operation)
4040
responses:
41-
"200":
41+
'200':
4242
description: OK
4343
content:
4444
application/json:
@@ -52,7 +52,7 @@ post:
5252
type: array
5353
items:
5454
type: string
55-
"400":
56-
$ref: "../../responses/BadRequest.yml"
57-
"404":
58-
$ref: "../../responses/IndexNotFound.yml"
55+
'400':
56+
$ref: '../../responses/BadRequest.yml'
57+
'404':
58+
$ref: '../../responses/IndexNotFound.yml'

openapi_spec/paths/indexes/searchMulti.yml renamed to openapi_spec/paths/indexes/multipleQueries.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
post:
22
tags:
33
- search
4-
operationId: searchMulti
4+
operationId: multipleQueries
55
summary: Get search results for the given requests.
66
parameters:
7-
- $ref: "../../parameters.yml#/AppId"
8-
- $ref: "../../parameters.yml#/ApiKey"
7+
- $ref: '../../parameters.yml#/AppId'
8+
- $ref: '../../parameters.yml#/ApiKey'
99
requestBody:
1010
required: true
1111
content:
@@ -43,11 +43,11 @@ post:
4343
- indexName
4444
strategy:
4545
type: string
46-
enum: ["none", "stopIfEnoughMatches"]
46+
enum: ['none', 'stopIfEnoughMatches']
4747
required:
4848
- requests
4949
responses:
50-
"200":
50+
'200':
5151
description: OK
5252
content:
5353
application/json:
@@ -75,9 +75,9 @@ post:
7575
type: integer
7676
queryID:
7777
type: string
78-
pattern: "[a-f0-9]{32}"
78+
pattern: '[a-f0-9]{32}'
7979
example: 43b15df305339e827f0ac0bdc5ebcaa7
80-
"400":
81-
$ref: "../../responses/BadRequest.yml"
82-
"404":
83-
$ref: "../../responses/IndexNotFound.yml"
80+
'400':
81+
$ref: '../../responses/BadRequest.yml'
82+
'404':
83+
$ref: '../../responses/IndexNotFound.yml'

openapi_spec/paths/indexes/saveObject.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ post:
55
summary: Save object
66
description: Add an object to the index, automatically assigning it an object ID
77
parameters:
8-
- $ref: "../../parameters.yml#/AppId"
9-
- $ref: "../../parameters.yml#/ApiKey"
10-
- $ref: "../../parameters.yml#/IndexName"
8+
- $ref: '../../parameters.yml#/AppId'
9+
- $ref: '../../parameters.yml#/ApiKey'
10+
- $ref: '../../parameters.yml#/IndexName'
1111
requestBody:
1212
required: true
1313
content:
@@ -16,7 +16,7 @@ post:
1616
type: object
1717
additionalProperties: true
1818
responses:
19-
"200":
19+
'200':
2020
description: OK
2121
content:
2222
application/json:
@@ -30,7 +30,7 @@ post:
3030
type: integer
3131
objectID:
3232
type: string
33-
"400":
34-
$ref: "../../responses/BadRequest.yml"
35-
"404":
36-
$ref: "../../responses/IndexNotFound.yml"
33+
'400':
34+
$ref: '../../responses/BadRequest.yml'
35+
'404':
36+
$ref: '../../responses/IndexNotFound.yml'

openapi_spec/paths/indexes/search.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ post:
44
operationId: search
55
summary: Get search results
66
parameters:
7-
- $ref: "../../parameters.yml#/AppId"
8-
- $ref: "../../parameters.yml#/ApiKey"
9-
- $ref: "../../parameters.yml#/IndexName"
7+
- $ref: '../../parameters.yml#/AppId'
8+
- $ref: '../../parameters.yml#/ApiKey'
9+
- $ref: '../../parameters.yml#/IndexName'
1010
requestBody:
11-
$ref: "../../schemas/SearchParams.yml"
11+
$ref: '../../schemas/SearchParams.yml'
1212
responses:
13-
"200":
13+
'200':
1414
description: OK
1515
content:
1616
application/json:
@@ -32,9 +32,9 @@ post:
3232
type: integer
3333
queryID:
3434
type: string
35-
pattern: "[a-f0-9]{32}"
35+
pattern: '[a-f0-9]{32}'
3636
example: 43b15df305339e827f0ac0bdc5ebcaa7
37-
"400":
38-
$ref: "../../responses/BadRequest.yml"
39-
"404":
40-
$ref: "../../responses/IndexNotFound.yml"
37+
'400':
38+
$ref: '../../responses/BadRequest.yml'
39+
'404':
40+
$ref: '../../responses/IndexNotFound.yml'

openapi_spec/responses/BadRequest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ description: Bad request or request arguments
22
content:
33
application/json:
44
schema:
5-
$ref: "../schemas/Error.yml"
5+
$ref: '../schemas/Error.yml'

openapi_spec/responses/IndexNotFound.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ description: Index not found
22
content:
33
application/json:
44
schema:
5-
$ref: "../schemas/Error.yml"
5+
$ref: '../schemas/Error.yml'

openapi_spec/schemas/Error.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ additionalProperties: true
44
properties:
55
message:
66
type: string
7-
example: "Invalid application id"
7+
example: 'Invalid application id'

openapi_spec/schemas/SearchParams.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ properties:
44
query:
55
type: string
66
description: The text to search in the index.
7-
default: ""
7+
default: ''
88
similarQuery:
99
type: string
10-
description: Overrides the query parameter and performs a more generic search that can be used to find similar results.
11-
default: ""
10+
description: Overrides the query parameter and performs a more generic search that can be used to find "similar" results.
11+
default: ''
1212
searchableAttributes:
1313
type: array
1414
items:
@@ -32,7 +32,7 @@ properties:
3232
items:
3333
type: string
3434
description: This parameter controls which attributes to retrieve and which not to retrieve.
35-
default: ["*"]
35+
default: ['*']
3636
restrictSearchableAttributes:
3737
type: array
3838
items:
@@ -45,14 +45,14 @@ properties:
4545
type: string
4646
description: Controls how Algolia should sort your results.
4747
default:
48-
- "typo"
49-
- "geo"
50-
- "words"
51-
- "filters"
52-
- "proximity"
53-
- "attribute"
54-
- "exact"
55-
- "custom"
48+
- 'typo'
49+
- 'geo'
50+
- 'words'
51+
- 'filters'
52+
- 'proximity'
53+
- 'attribute'
54+
- 'exact'
55+
- 'custom'
5656
customRanking:
5757
type: array
5858
items:
@@ -72,7 +72,7 @@ properties:
7272
filters:
7373
type: string
7474
description: Filter the query with numeric, facet and/or tag filters.
75-
default: ""
75+
default: ''
7676
# There could be a pattern for this one (complicated one)
7777
facetFilters:
7878
type: array
@@ -119,7 +119,7 @@ properties:
119119
sortFacetValuesBy:
120120
type: string
121121
description: Controls how facet values are fetched.
122-
default: "count"
122+
default: 'count'
123123
attributesToHighlight:
124124
type: array
125125
items:
@@ -134,15 +134,15 @@ properties:
134134
highlightPreTag:
135135
type: string
136136
description: The HTML string to insert before the highlighted parts in all highlight and snippet results.
137-
default: "<em>"
137+
default: '<em>'
138138
highlightPostTag:
139139
type: string
140140
description: The HTML string to insert after the highlighted parts in all highlight and snippet results.
141-
default: "</em>"
141+
default: '</em>'
142142
snippetEllipsisText:
143143
type: string
144144
description: String used as an ellipsis indicator when a snippet is truncated.
145-
default: ""
145+
default: ''
146146
restrictHighlightAndSnippetArrays:
147147
type: boolean
148148
description: Restrict highlighting and snippeting to items that matched the query.
@@ -177,7 +177,7 @@ properties:
177177
default: 8
178178
typoTolerance:
179179
type: string
180-
enum: [true, false, "min", "strict"]
180+
enum: [true, false, 'min', 'strict']
181181
description: Controls whether typo tolerance is enabled and how it is applied.
182182
default: true
183183
allowTyposOnNumericTokens:
@@ -199,7 +199,7 @@ properties:
199199
separatorsToIndex:
200200
type: string
201201
description: Control which separators are indexed.
202-
default: ""
202+
default: ''
203203
aroundLatLng:
204204
type: string
205205
description: Search for entries around a central geolocation, enabling a geo search within a circular area.
@@ -259,7 +259,7 @@ properties:
259259
keepDiacriticsOnCharacters:
260260
type: string
261261
description: List of characters that the engine shouldn’t automatically normalize.
262-
default: ""
262+
default: ''
263263
customNormalization:
264264
type: object
265265
additionalProperties: true
@@ -314,14 +314,14 @@ properties:
314314
description: Associates a certain user token with the current search.
315315
queryType:
316316
type: string
317-
enum: ["prefixLast", "prefixAll", "prefixNone"]
317+
enum: ['prefixLast', 'prefixAll', 'prefixNone']
318318
description: Controls if and how query words are interpreted as prefixes.
319-
default: "prefixLast"
319+
default: 'prefixLast'
320320
removeWordsIfNoResults:
321321
type: string
322-
enum: ["none", "lastWords", "firstWords", "allOptional"]
322+
enum: ['none', 'lastWords', 'firstWords', 'allOptional']
323323
description: Selects a strategy to remove words from the query when it doesn’t match any hits.
324-
default: "none"
324+
default: 'none'
325325
advancedSyntax:
326326
type: boolean
327327
description: Enables the advanced query syntax.
@@ -346,23 +346,23 @@ properties:
346346
default: []
347347
exactOnSingleWordQuery:
348348
type: string
349-
enum: ["attribute", "none", "word"]
349+
enum: ['attribute', 'none', 'word']
350350
description: Controls how the exact ranking criterion is computed when the query contains only one word.
351-
default: "attribute"
351+
default: 'attribute'
352352
alternativesAsExact:
353353
type: array
354354
items:
355355
type: string
356-
enum: ["ignorePlurals", "singleWordSynonym", "multiWordsSynonym"]
356+
enum: ['ignorePlurals', 'singleWordSynonym', 'multiWordsSynonym']
357357
description: List of alternatives that should be considered an exact match by the exact ranking criterion.
358-
default: ["ignorePlurals", "singleWordSynonym"]
358+
default: ['ignorePlurals', 'singleWordSynonym']
359359
advancedSyntaxFeatures:
360360
type: array
361361
items:
362362
type: string
363-
enum: ["exactPhrase", "excludeWords"]
363+
enum: ['exactPhrase', 'excludeWords']
364364
description: Allows you to specify which advanced syntax features are active when ‘advancedSyntax’ is enabled.
365-
default: ["exactPhrase", "excludeWords"]
365+
default: ['exactPhrase', 'excludeWords']
366366
numericAttributesForFiltering:
367367
type: array
368368
items:

openapi_spec/spec.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ paths:
2525
# /1/indexes/{indexName}/query:
2626
# $ref: "./paths/indexes/search.yml"
2727
/1/indexes/*/queries:
28-
$ref: "./paths/indexes/searchMulti.yml"
28+
$ref: './paths/indexes/multipleQueries.yml'
2929
/1/indexes/{indexName}:
30-
$ref: "./paths/indexes/saveObject.yml"
30+
$ref: './paths/indexes/saveObject.yml'
3131
/1/indexes/{indexName}/batch:
32-
$ref: "./paths/indexes/batch.yml"
32+
$ref: './paths/indexes/batch.yml'

0 commit comments

Comments
 (0)