Comments (7)
Exactly as @c-pius wrote. For example 15:59:60-08:00
will mean 15:59:60
time, 8 hours behind UTC.
Additionally, following with the RFC 3339 there should be partial-time
(time
should use this format, but I don't know if this is a good idea -> ref: OAI/OpenAPI-Specification#845) format without offset and full-time
with offset.
from openapi-sampler.
What about time zone properties? For example +00:00
?
from openapi-sampler.
openapi-sampler uses Z
notation for time offset in date-time
. so I guess RFC 3339 full-time
with Z
time offset would make sense?
openapi-sampler/src/samplers/string.js
Line 21 in d60cadd
Line 10 in d60cadd
from openapi-sampler.
I think it would be better to use a format of "partial-time" or "full-time" for clarity and alignment with the RFC 3339.
from openapi-sampler.
@magicmatatjahu you are right, even appears like the discussions from your reference lean towards time
format using partial-time
from the RFC?
I don't really have an opinion whether time
should use partial-time
or full-time
. Also not sure if it is a good idea to provide different formats "partial-time" and "full-time".
from openapi-sampler.
@c-pius "partial-time" and "full-time" should be provide for this same cases like date
and date-time
, I mean you should have possibility to define time without timezone and with timezone. If there will be only full-time
for example, then specifying time with a zero offset (if an offset is not needed) may be confusing
I can create PR for that, but after read the issue, which I mentioned it might be better to wait for the official support for the time
format or for the format registry.
from openapi-sampler.
As I see the time
format is added in #122 PR, so I close the issue, thanks!
from openapi-sampler.
Related Issues (20)
- Support for circular references
- Date issue in version 1.0.0-beta.16
- Validate nested arrays throws exception HOT 1
- Request to add support for xml openapi spec properties HOT 2
- const should take precedence over other keywords HOT 1
- When an object schema uses oneOf, the readOnly/writeOnly properties are being ignored HOT 1
- [feat]: support for `x-additionalPropertiesName` when generating property names
- readOnly and writeOnly are not honored when used in an allOf
- node_modules/openapi-sampler/src/traverse.js Unexpected token(95:8). You may need an appropriate loader to handle this file type.
- OneOf not generating all options
- Invalid reference token and decoding
- What is the expected value of `spec` in the signature? HOT 1
- `required` not handled in `oneOf` clause
- Generated examples are not valid when using regular expression patterns HOT 2
- maxProperties not respected in generated sample
- Update tests to use jest
- Missing contribution.md file
- Crash inside allOf.js HOT 3
- Specify default value for the integer example HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-sampler.