From f58e3f41040a4c8170a29309994a239c570dc227 Mon Sep 17 00:00:00 2001 From: Ken-ichi Ueda Date: Fri, 2 Feb 2024 12:07:27 -0800 Subject: [PATCH] Updated docs for v2/observations/updates --- .../schema/request/observations_updates.js | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/openapi/schema/request/observations_updates.js b/openapi/schema/request/observations_updates.js index 725c62fe..b0e47cf9 100644 --- a/openapi/schema/request/observations_updates.js +++ b/openapi/schema/request/observations_updates.js @@ -1,12 +1,20 @@ const Joi = require( "joi" ); module.exports = Joi.object( ).keys( { - created_after: Joi.string( ), - viewed: Joi.boolean( ), - observations_by: Joi.string( ).valid( - "owner", - "following" - ), + created_after: Joi.string( ) + .description( "ISO8601 datetime after which the update was created" ), + viewed: Joi.boolean( ) + .description( + "When false this only returns updates that have not been viewed " + + "by the authenticated user. When true it returns all updates." + ) + .default( true ), + observations_by: Joi.string( ) + .valid( "owner", "following" ) + .description( + "Restrict to updates on observations by the authenticated user (owner) " + + "or on observations the authenticated user is following" + ), page: Joi.number( ).integer( ), per_page: Joi.number( ).integer( ), fields: Joi.any( )