-
Notifications
You must be signed in to change notification settings - Fork 23
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
Comments
sosna
changed the title
openapi spec: define sdmx date
Define a schema valid for both startPeriod and endPeriod
Feb 23, 2022
For sdmx-json, we have the following json schema: "StandardTimePeriodType":{
"description":"StandardTimePeriodType defines the set of standard time periods in SDMX. This includes the reporting time periods and the basic date type (i.e. the calendar time periods and the dateTime format).",
"anyOf":[
{
"description":"xs:gYear: GregorianTimePeriodType defines the set of standard calendar periods in SDMX.",
"type":"string",
"pattern":"^([1-9][0-9]{3,}|0[0-9]{3})(Z|([\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$](file://+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))%3f$)"
},
{
"description":"xs:gYearMonth: GregorianTimePeriodType defines the set of standard calendar periods in SDMX.",
"type":"string",
"pattern":"^([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])(Z|([\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$](file://+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))%3f$)"
},
{
"type":"string",
"format":"date"
},
{
"type":"string",
"format":"date-time"
},
{
"type":"string",
"pattern":"^\\d{4}\\-([ASTQ][\\d{1}|[MW]\\d{2}|[D]\\d{3})(Z|((\\+|\\-)\\d{2}:\\d{2}))?$](file://d%7b1%7d|[MW]/d%7b2%7d|%5bD%5d/d%7b3%7d)(Z|((/+|/-)/d%7b2%7d:/d%7b2%7d))%3f$)",
"description":"ReportingTimePeriodType defines standard reporting periods in SDMX, which are all in relation to the start day (day-month) of a reporting year which is specified in the specialized reporting year start day attribute. If the reporting year start day is not defined, a day of January 1 is assumed. The reporting year must be epxressed as the year at the beginning of the period. Therfore, if the reproting year runs from April to March, any given reporting year is expressed as the year for April. The general format of a report period can be described as [year]-[period][time zone]?, where the type of period is designated with a single character followed by a number representing the period. Note that all periods allow for an optional time zone offset. See the details of each member type for the specifics of its format."
}
]
}, I hope that this is the information that was required. |
Thanks, @dosse. This is no longer required, as |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I expect
To define a reusable schema valid for both startPeriod and endPeriod
The text was updated successfully, but these errors were encountered: