Skip to content

Commit

Permalink
Adopt example values from freeform blurb
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Dec 3, 2024
1 parent 65b46e7 commit d1fbaae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nmdc_runtime/api/models/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ class ListRequest(BaseModel):
title="Filter",
description="""The criteria by which you want to filter the resources, in the same format as the [`query`
parameter](https://www.mongodb.com/docs/manual/reference/method/db.collection.find/#std-label-method-find-query)
of MongoDB's `db.collection.find()` method.\n\n_Example:_ `{"ecosystem_type": "Freshwater"}`""",
of MongoDB's `db.collection.find()` method.\n\n_Example:_
`{"lat_lon.latitude": {"$gt": 45.0}, "ecosystem_category": "Plants"}`""",
examples=[
r'{"ecosystem_type": "Freshwater"}',
r'{"lat_lon.latitude": {"$gt": 45.0}, "ecosystem_category": "Plants"}',
],
)
# TODO: Document why the optional type here is `int` as opposed to `PerPageRange` (`FindRequest` uses the latter).
Expand All @@ -58,9 +60,9 @@ class ListRequest(BaseModel):
title="Projection",
description="""Comma-delimited list of the names of the fields you want the resources in the response to
include. Note: In addition to those fields, the response will also include the `id`
field.\n\n_Example_: `ecosystem_type,name`""",
field.\n\n_Example_: `name, ecosystem_type`""",
examples=[
"ecosystem_type,name",
"name, ecosystem_type",
],
)

Expand Down

0 comments on commit d1fbaae

Please sign in to comment.