openai / openai/openai-openapi

Lack of unixtime format for lots of properties

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement specification
Dominant language
No language data
Stars
2.5k
Forks
527
Avg merge
1h 46m
Merged PRs (30d)
2

Description

The description is missing a lot of unixtime formats for properties. This degrades the client experiences (wrong type is generated), and validation abilities.
See the example overlay actions

- description: Change type to integer format to created_at properties with type number
    update:
      type: integer
    target: "$..[?(@.properties && @.properties['created_at'] && @.properties['created_at'].type == 'number')].properties['created_at']"
  - description: Adds the unixtime format to created_at properties
    update:
      format: unixtime
    target: "$..[?(@.properties && @.properties['created_at'] && @.properties['created_at'].type == 'integer')].properties['created_at']"
  - description: Adds the unixtime format to created properties
    update:
      format: unixtime
    target: "$..[?(@.properties && @.properties['created'] && @.properties['created'].type == 'integer')].properties['created']"
  - description: Adds the unixtime format to last_active_at property
    update:
      format: unixtime
    target: "$.components.schemas['ContainerResource'].properties['last_active_at']"
  - description: Adds the unixtime format to last_active_at property
    update:
      format: unixtime
    target: "$.components.schemas['VectorStoreObject'].properties['last_active_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to expires_at property
    update:
      format: unixtime
    target: "$..[?(@.properties && @.properties['expires_at'] && @.properties['expires_at'].type == 'integer')].properties['expires_at']"
  - description: Adds the unixtime format to valid_at property
    update:
      format: unixtime
    target: "$..[?(@.properties && @.properties['valid_at'] && @.properties['valid_at'].type == 'integer')].properties['valid_at']"
  - description: Adds the unixtime format to finished_at property
    update:
      format: unixtime
    target: "$.components.schemas['FineTuningJob'].properties['finished_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to estimated_finish property
    update:
      format: unixtime
    target: "$.components.schemas['FineTuningJob'].properties['estimated_finish'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to effective_at property
    update:
      format: unixtime
    target: "$.components.schemas['AuditLog'].properties['effective_at']"
  - description: Adds the unixtime format to finished_at property
    update:
      format: unixtime
    target: "$.components.schemas['AdminApiKey'].properties['last_used_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to in_progress_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['in_progress_at']"
  - description: Adds the unixtime format to cancelled_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['cancelled_at']"
  - description: Adds the unixtime format to cancelling_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['cancelling_at']"
  - description: Adds the unixtime format to completed_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['completed_at']"
  - description: Adds the unixtime format to expired_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['expired_at']"
  - description: Adds the unixtime format to expires_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['expires_at']"
  - description: Adds the unixtime format to failed_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['failed_at']"
  - description: Adds the unixtime format to finalizing_at property
    update:
      format: unixtime
    target: "$.components.schemas['Batch'].properties['finalizing_at']"
  - description: Adds the unixtime format to accepted_at property
    update:
      format: unixtime
    target: "$.components.schemas['Invite'].properties['accepted_at']"
  - description: Adds the unixtime format to invited_at property
    update:
      format: unixtime
    target: "$.components.schemas['Invite'].properties['invited_at']"
  - description: Adds the unixtime format to completed_at property
    update:
      format: unixtime
    target: "$.components.schemas['MessageObject'].properties['completed_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to incomplete_at property
    update:
      format: unixtime
    target: "$.components.schemas['MessageObject'].properties['incomplete_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to archived_at property
    update:
      format: unixtime
    target: "$.components.schemas['Project'].properties['archived_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to last_used_at property
    update:
      format: unixtime
    target: "$.components.schemas['ProjectApiKey'].properties['last_used_at']"
  - description: Adds the unixtime format to added_at property
    update:
      format: unixtime
    target: "$.components.schemas['ProjectUser'].properties['added_at']"
  - description: Adds the unixtime format to cancelled_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunObject'].properties['cancelled_at']"
  - description: Adds the unixtime format to completed_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunObject'].properties['completed_at']"
  - description: Adds the unixtime format to failed_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunObject'].properties['failed_at']"
  - description: Adds the unixtime format to started_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunObject'].properties['started_at']"
  - description: Adds the unixtime format to cancelled_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunStepObject'].properties['cancelled_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to completed_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunStepObject'].properties['completed_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to expired_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunStepObject'].properties['expired_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to failed_at property
    update:
      format: unixtime
    target: "$.components.schemas['RunStepObject'].properties['failed_at'].anyOf[?(@.type=='integer')]"
  - description: Adds the unixtime format to added_at property
    update:
      format: unixtime
    target: "$.components.schemas['User'].properties['added_at']"
  - description: Adds the unixtime format to expires_at property
    update:
      format: unixtime
    target: "$.components.schemas['VectorStoreObject'].properties['expires_at'].anyOf[?(@.type=='integer')]"
  - description: Change type to integer for completed_at property in Response schema
    update:
      type: integer
    target: "$.components.schemas['Response'].allOf[2].properties['completed_at'].anyOf[0]"
  - description: Adds the unixtime format to completed_at property in Response schema
    update:
      format: unixtime
    target: "$.components.schemas['Response'].allOf[2].properties['completed_at'].anyOf[0]"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the example overlay actions in the issue and locate the OpenAPI schema entries they target. Check the affected timestamp properties and update the missing type or unixtime format consistently; done means the listed properties produce the intended client types and validation metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.