Comments (4)
Great library!
š¤
I'm happy to provide a PR if you want
While a PR would be greatly appreciated, it would be pretty sizable in scale because this is part of the version 3 spec which isnāt currently supported (though itās probably high time this library added that support). I think this library probably needs a rewrite to be a bit more maintainable (I wrote it before becoming more comfortable with lexers, which Iād like to use moving forward, but, hey, everyoneās gotta start somewhere! Even Babelās first version was sebmckās first crack at it).
What Iāll do is open an issue to support Swagger v3 specs, and close this one, if thatās all right. Hopefully this will be taken care of by that.
from openapi-typescript.
@Saegrov I apologizeāthis isnāt unique to v3 at all! This was actually a bug. This library did support additionalProperties
at the top-level, but it accidentally didnāt respect it for nested properties
. That will be fixed in #130, and Iāll push a version to npm as soon as thatās good.
Also updated the tests with your exact example to ensure this stays working.
from openapi-typescript.
@DangoDev Sweet! Thank you very much!
from openapi-typescript.
Hey! Unfortunately, it seems like additionalProperties
is still not supported. It generates an undefined object
instead.
from openapi-typescript.
Related Issues (20)
- Discriminator Mapping Support for oneOf HOT 3
- Fetch method type incorrectly blocks `headers` HOT 2
- Replace vitest-fetch-mock with msw in tests
- Lost type-safety while modify response in the middleware HOT 2
- #1580 causes type issue in `MaybeOptionalInit` HOT 1
- Getting 415s on all PUT, POST HOT 1
- Request for Option to Map `OneOf` to union HOT 1
- `$ref` with other keywords doesn't work HOT 2
- Missing Types for Pattern, MaxLength, MinLength HOT 2
- `defaultPathSerializer` doesn't url-encode its primitive string params
- Export component's and path's types with friendly names
- Self referential types fail to compile
- no matches found:
- Add option to represent non-required properties as required fields in TS with `| undefined`
- Cannot handle dynamic path parameters in the middle of a path
- Query serializer ignores explicit "explode" field value HOT 3
- Type discrimination between `data` and `error` doesn't work HOT 2
- Check/verify functionality for CLI HOT 1
- Enhancing openapi-typescript for Improved Type Safety: Generating Arrays from Enum Definitions HOT 3
- Headers passed in createClient not getting omitted from the headers in Client methods. 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-typescript.