Skip to content

Instantly share code, notes, and snippets.

@DavidBiesack
Last active November 15, 2021 16:29
Show Gist options
  • Save DavidBiesack/3795f245cce09098be5e6d40a9d212bc to your computer and use it in GitHub Desktop.
Save DavidBiesack/3795f245cce09098be5e6d40a9d212bc to your computer and use it in GitHub Desktop.
openapi-generator issue
openapi: 3.0.0
info:
title: Dates
description: Date schemas
version: 0.0.1
servers:
- url: /dates
tags:
- name: Dates
description: Dates
paths:
/:
get:
summary: Get dates
description: Get dates
operationId: getDates
responses:
"200":
description: OK.
content:
"*/*":
schema:
$ref: "#/components/schemas/dates"
tags:
- Dates
components:
schemas:
dates:
title: Dates
type: object
properties:
date:
$ref: '#/components/schemas/date'
roDate:
$ref: '#/components/schemas/readOnlyDate'
timestamp:
$ref: '#/components/schemas/timestamp'
roTimestamp:
$ref: '#/components/schemas/readOnlyTimestamp'
date:
title: Date
description: >-
A date, formatted in [RFC 3339](https://tools.ietf.org/html/rfc3339) `date`
format: `YYYY-MM-DD`.
type: string
format: date
example: 2021-10-31
minLength: 10
maxLength: 10
x-apiture-since: 1.18.0
readOnlyDate:
title: Read-Only Date
description: >-
A readonly or derived date, formatted in [RFC 3339](https://tools.ietf.org/html/rfc3339) `date`
format: `YYYY-MM-DD`.
allOf:
- $ref: '#/components/schemas/date'
readOnly: true
x-apiture-since: 1.18.0
timestamp:
title: Timestamp
description: >-
A timestamp (an instant in time) formatted in [RFC 3339](https://tools.ietf.org/html/rfc3339) `date-time`
UTC format: `YYYY-MM-DDThh:mm:ss.sssZ`.
type: string
minLength: 20
maxLength: 30
format: date-time
x-apiture-since: 1.18.0
example: '2021-10-30T19:06:04.250Z'
readOnlyTimestamp:
title: Read-Only Timestamp
description: >-
A readonly or derived timestamp (an instant in time) formatted in [RFC 3339](https://tools.ietf.org/html/rfc3339) `date-time`
UTC format: `YYYY-MM-DDThh:mm:ss.sssZ`.
allOf:
- $ref: '#/components/schemas/timestamp'
readOnly: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment