Skip to content

Commit 0a6e9b4

Browse files
committed
remove defaults examples in openAPI
1 parent df97771 commit 0a6e9b4

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

docs/src/advanced/dependencies.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class AssetsParams(DefaultDependency):
6060
title="Asset names",
6161
description="Asset's names.",
6262
openapi_examples={
63+
"user-provided": {"value": None},
6364
"one-asset": {
6465
"description": "Return results for asset `data`.",
6566
"value": ["data"],
@@ -99,6 +100,7 @@ class AssetsBidxParams(AssetsParams):
99100
description="Per asset band indexes",
100101
alias="asset_bidx",
101102
openapi_examples={
103+
"user-provided": {"value": None},
102104
"one-asset": {
103105
"description": "Return indexes 1,2,3 of asset `data`.",
104106
"value": ["data|1;2;3"],
@@ -117,6 +119,7 @@ class AssetsBidxParams(AssetsParams):
117119
title="Per asset band expression",
118120
description="Per asset band expression",
119121
openapi_examples={
122+
"user-provided": {"value": None},
120123
"one-asset": {
121124
"description": "Return results for expression `b1*b2+b3` of asset `data`.",
122125
"value": ["data|b1*b2+b3"],
@@ -171,6 +174,7 @@ class AssetsBidxExprParams(AssetsParams):
171174
title="Band Math expression",
172175
description="Band math expression between assets",
173176
openapi_examples={
177+
"user-provided": {"value": None},
174178
"simple": {
175179
"description": "Return results of expression between assets.",
176180
"value": "asset1_b1 + asset2_b1 / asset3_b1",
@@ -186,6 +190,7 @@ class AssetsBidxExprParams(AssetsParams):
186190
description="Per asset band indexes (coma separated indexes)",
187191
alias="asset_bidx",
188192
openapi_examples={
193+
"user-provided": {"value": None},
189194
"one-asset": {
190195
"description": "Return indexes 1,2,3 of asset `data`.",
191196
"value": ["data|1,2,3"],
@@ -272,6 +277,7 @@ class BandsParams(DefaultDependency):
272277
title="Band names",
273278
description="Band's names.",
274279
openapi_examples={
280+
"user-provided": {"value": None},
275281
"one-band": {
276282
"description": "Return results for band `B01`.",
277283
"value": ["B01"],
@@ -352,7 +358,11 @@ class BidxParams(DefaultDependency):
352358
title="Band indexes",
353359
alias="bidx",
354360
description="Dataset band indexes",
355-
openapi_examples={"one-band": {"value": [1]}, "multi-bands": {"value": [1, 2, 3]}},
361+
openapi_examples={
362+
"user-provided": {"value": None},
363+
"one-band": {"value": [1]},
364+
"multi-bands": {"value": [1, 2, 3]},
365+
},
356366
),
357367
] = None
358368
```
@@ -381,6 +391,7 @@ class ExpressionParams(DefaultDependency):
381391
title="Band Math expression",
382392
description="rio-tiler's band math expression",
383393
openapi_examples={
394+
"user-provided": {"value": None},
384395
"simple": {"description": "Simple band math.", "value": "b1/b2"},
385396
"multi-bands": {
386397
"description": "Semicolon (;) delimited expressions (band1: b1/b2, band2: b2+b3).",
@@ -633,6 +644,7 @@ If bins is a sequence (comma `,` delimited values), it defines a monotonically i
633644
link: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html
634645
""",
635646
openapi_examples={
647+
"user-provided": {"value": None},
636648
"simple": {
637649
"description": "Defines the number of equal-width bins",
638650
"value": 8,

docs/src/examples/code/tiler_with_custom_stac+xarray.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ class SingleAssetsParams(DefaultDependency):
206206
alias="bidx",
207207
description="Dataset band indexes",
208208
openapi_examples={
209+
"user-provided": {"value": None},
209210
"one-band": {"value": [1]},
210211
"multi-bands": {"value": [1, 2, 3]},
211212
},

src/titiler/core/titiler/core/dependencies.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class BidxParams(DefaultDependency):
100100
alias="bidx",
101101
description="Dataset band indexes",
102102
openapi_examples={
103+
"user-provided": {"value": None},
103104
"one-band": {"value": [1]},
104105
"multi-bands": {"value": [1, 2, 3]},
105106
},
@@ -117,6 +118,7 @@ class ExpressionParams(DefaultDependency):
117118
title="Band Math expression",
118119
description="rio-tiler's band math expression",
119120
openapi_examples={
121+
"user-provided": {"value": None},
120122
"simple": {"description": "Simple band math.", "value": "b1/b2"},
121123
"multi-bands": {
122124
"description": "Semicolon (;) delimited expressions (band1: b1/b2, band2: b2+b3).",
@@ -145,6 +147,7 @@ class AssetsParams(DefaultDependency):
145147
title="Asset names",
146148
description="Asset's names.",
147149
openapi_examples={
150+
"user-provided": {"value": None},
148151
"one-asset": {
149152
"description": "Return results for asset `data`.",
150153
"value": ["data"],
@@ -185,6 +188,7 @@ class AssetsBidxExprParams(AssetsParams, BidxParams):
185188
title="Band Math expression",
186189
description="Band math expression between assets",
187190
openapi_examples={
191+
"user-provided": {"value": None},
188192
"simple": {
189193
"description": "Return results of expression between assets.",
190194
"value": "asset1_b1 + asset2_b1 / asset3_b1",
@@ -200,6 +204,7 @@ class AssetsBidxExprParams(AssetsParams, BidxParams):
200204
description="Per asset band indexes (coma separated indexes)",
201205
alias="asset_bidx",
202206
openapi_examples={
207+
"user-provided": {"value": None},
203208
"one-asset": {
204209
"description": "Return indexes 1,2,3 of asset `data`.",
205210
"value": ["data|1,2,3"],
@@ -266,6 +271,7 @@ class AssetsBidxParams(AssetsParams, BidxParams):
266271
description="Per asset band indexes",
267272
alias="asset_bidx",
268273
openapi_examples={
274+
"user-provided": {"value": None},
269275
"one-asset": {
270276
"description": "Return indexes 1,2,3 of asset `data`.",
271277
"value": ["data|1;2;3"],
@@ -284,6 +290,7 @@ class AssetsBidxParams(AssetsParams, BidxParams):
284290
title="Per asset band expression",
285291
description="Per asset band expression",
286292
openapi_examples={
293+
"user-provided": {"value": None},
287294
"one-asset": {
288295
"description": "Return results for expression `b1*b2+b3` of asset `data`.",
289296
"value": ["data|b1*b2+b3"],
@@ -323,6 +330,7 @@ class BandsParams(DefaultDependency):
323330
title="Band names",
324331
description="Band's names.",
325332
openapi_examples={
333+
"user-provided": {"value": None},
326334
"one-band": {
327335
"description": "Return results for band `B01`.",
328336
"value": ["B01"],
@@ -564,6 +572,7 @@ class HistogramParams(DefaultDependency):
564572
link: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html
565573
""",
566574
openapi_examples={
575+
"user-provided": {"value": None},
567576
"simple": {
568577
"description": "Defines the number of equal-width bins",
569578
"value": 8,

0 commit comments

Comments
 (0)