twilio / twilio-oai

The Twilio OpenAPI Specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Odd parameter naming standards for date fields that support less than or greater than

amodgit opened this issue · comments

Issue Summary

Naming used for date parameters seems to be odd. Date parameter that support less than and/or greater than use > or < in parameter names e.g. StartTime< or StartTime>

Steps to Reproduce

N/A

Code Snippet

"/2010-04-01/Accounts/{AccountSid}/Messages.json": {
      "description": "A Message resource represents an inbound or outbound message.",
      "get": {
        "description": "Retrieve a list of messages belonging to the account used to make the request",
        "operationId": "ListMessage",
        "parameters": [
          ......,
          {
            "description": "The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date.",
            "in": "query",
            "name": "DateSent<",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date.",
            "in": "query",
            "name": "DateSent>",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },

Exception/Log

N/A

Technical details:

  • twilio-oai version: twilio_api_v2010 (1.8)
  • open version:

Hi @amodgit
This parameter naming with inequalities for date and time fields are what the Twilio API's are expecting. In some of our other products like the Twilio CLI we have abstracted a layer to convert the DateSent< parameter to date-sent-before then convert it back to the inequality form to send it back to the API.