Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a schema valid for both startPeriod and endPeriod #102

Open
ioggstream opened this issue Apr 20, 2020 · 0 comments
Open

Define a schema valid for both startPeriod and endPeriod #102

ioggstream opened this issue Apr 20, 2020 · 0 comments
Assignees

Comments

@ioggstream
Copy link
Contributor

I expect

To define a reusable schema valid for both startPeriod and endPeriod

components:
  schemas:
    SDMXPeriod:
       type: string
       pattern: '^\d{4}-?((\d{2}(-\d{2})?)|A1|S[1|2]|Q[1-4]|T[1-3]|M(0[1-9]|1[0-2])|W(0[1-9]|[1-4][0-9]|5[0-3])|D(0[0-9][1-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-6]))?$'
       description: |-
          Examples:
          * `2000`: Year (ISO 8601)
          * `2000-01`: Month (ISO 8601)
          * `2000-01-01`: Date (ISO 8601)
          * `2000-Q1`: Quarter (SDMX)
          * `2000-W01`: Week (SDMX)



startPeriod:
      in: query
      name: startPeriod
      description: |
        The start of the period for which results should be supplied (inclusive).
      schema:
         $ref: '#/components/schemas/SDMXPeriod'
      
@sosna sosna self-assigned this Apr 21, 2020
@sosna sosna added this to To do in v2.0.0 via automation Apr 21, 2020
@sosna sosna added this to the v2.0.0 milestone Apr 21, 2020
@sosna sosna moved this from To do to Needs review in v2.0.0 May 8, 2020
@sosna sosna removed this from Needs review in v2.0.0 Sep 3, 2020
@sosna sosna removed this from the v2.0.0 milestone Sep 3, 2020
@sosna sosna added normal and removed minor labels Feb 23, 2022
@sosna sosna changed the title openapi spec: define sdmx date Define a schema valid for both startPeriod and endPeriod Feb 23, 2022
@sosna sosna assigned dosse and unassigned sosna Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Change proposed
Development

No branches or pull requests

3 participants