Граф коммитов

2212 Коммитов

Автор SHA1 Сообщение Дата
Mark Probst effa7a8b54 pkg is a dev dependency 2018-04-29 23:03:10 -07:00
Mark Probst 8d3c88a05f Generate documentation via TypeDoc 2018-04-29 22:42:35 -07:00
Mark Probst 49954657ce Full URL to quicktype logo in README
The logo didn't display on NPM with a relative URL
2018-04-29 20:51:01 -07:00
Mark Probst 091f96a875
Merge pull request #835 from quicktype/stdin
Support input from stdin. Fixes #834
2018-04-29 20:48:33 -07:00
Mark Probst 33d329314f Support input from stdin. Fixes #834 2018-04-29 20:30:00 -07:00
Mark Probst 72464f829b
Merge pull request #833 from quicktype/subdirs
Reorganize and update to TS 2.8
2018-04-29 12:11:57 -07:00
Mark Probst 552d6e9d4b Make subdirectories lower-case 2018-04-29 11:46:11 -07:00
Mark Probst 27e4cd8df4 Package dedupe 2018-04-28 22:20:26 -07:00
Mark Probst 60757dd0af Update to TS 2.8 2018-04-28 22:05:27 -07:00
Mark Probst d7f77a2f6e Move URLGrammar and PostmanCollection into CLI dir
They're not used anywhere in quicktype core.
2018-04-28 21:08:15 -07:00
Mark Probst 6668129e27 Move input stuff into their own subdir 2018-04-28 21:06:10 -07:00
Mark Probst 678bcd47d3 Move graph rewrites into their own subdir 2018-04-28 20:14:06 -07:00
Mark Probst 33d8c58d78
Merge pull request #816 from quicktype/identity-attributes
Put enum and date/time information in type attributes
2018-04-28 19:32:14 -07:00
Mark Probst f92a4978fb Fix intersections and unions in deployment-target 2018-04-28 18:23:51 -07:00
Mark Probst 63922caaa8 Make Type.children into a method
So we can call it on super.
2018-04-28 15:36:48 -07:00
Mark Probst ffb5740c72 Always strict 2018-04-28 15:08:43 -07:00
Mark Probst c3bfd30db8 Env variable to not check strings for equality
Date/time gives me trouble with C# on MacOS, and I can't
be bothered to fix it properly right now.
2018-04-28 13:44:15 -07:00
Mark Probst 5cd1d09183 Don't use string for date/time in JSON Schema input
If we do this, all attributes will get combined when those
types are in a union, so when a date and an enum end up
in a union, the enum will lose its name from the input
schema.  The same problem applies to other attributes.
2018-04-28 13:44:15 -07:00
Mark Probst 4a2e58dc85 Use rx.test(x) instead of x.match(rx) !== null where appropriate 2018-04-28 13:44:15 -07:00
Mark Probst bb166a5cab Move date/time into StringTypes 2018-04-28 13:44:15 -07:00
Mark Probst 20c9c56da8 Always use strings first, convert to enums at the end 2018-04-28 13:44:15 -07:00
Mark Probst 066fe73a8d Allow enums and date/time unions 2018-04-28 13:44:15 -07:00
Mark Probst faf14e857a Don't generate enums prematurely 2018-04-28 13:44:15 -07:00
Mark Probst cc87ade358 Treat string types as regular attributes, no separate bookkeeping 2018-04-28 13:44:15 -07:00
Mark Probst 3462d40dbb Separate type for keeping inferred information about strings 2018-04-28 13:44:15 -07:00
Mark Probst c26b96071e Allow attributes to specify that their type is unique
We need this to make enums work.
2018-04-28 13:44:15 -07:00
Mark Probst cec82c763e More debug printing for the string enum cases attribute 2018-04-28 13:44:15 -07:00
Mark Probst 94887379cf Put string enum cases in a type attribute 2018-04-28 13:44:15 -07:00
Mark Probst 9387370253 Type attributes that can be part of identity 2018-04-28 13:44:12 -07:00
Mark Probst e8346cd514 Add attributes when reconstituting, not after 2018-04-28 06:55:20 -07:00
Mark Probst 725000724d Simplify unification a little 2018-04-28 06:55:20 -07:00
David Siegel a7cbe345eb
Merge pull request #832 from quicktype/no-number-enums
Don't make an enum if all cases are number strings
2018-04-27 16:10:02 -07:00
David Siegel 067de490fe Don't infer stringified numbers as enums
Fixes #453
2018-04-27 15:02:00 -07:00
David Siegel a975119ae8
Try was supposed to be `try?` (#830) 2018-04-27 14:53:53 -07:00
David Siegel 4335f2628a
URLSession task extensions for Swift (#829)
This is the Foundation way to download data
2018-04-27 13:33:58 -07:00
David Siegel 727ac6ca49
Merge pull request #828 from quicktype/swift-inits
Always emit a default initializer for classes
2018-04-26 14:08:46 -07:00
David Siegel 27d1455c09
Merge pull request #826 from quicktype/update-deps
Update dependencies
2018-04-26 14:04:22 -07:00
David Siegel 7e0c1c8bb2 Always emit a default intializer for classes
It's a compiler error to define an immutable class without an initializer (or initail values)

Fixes #827
2018-04-26 13:55:30 -07:00
David Siegel 8fa9335e6c Update dependencies 2018-04-26 13:42:35 -07:00
Mark Probst 2b51ccce42
Merge pull request #822 from quicktype/infer-maps-more
Repeatedly infer maps until nothing changes
2018-04-24 17:28:26 -04:00
Mark Probst 17612ea7e1 Always make objects with all-digit keys into maps. Fixes #819 2018-04-24 13:23:16 -07:00
Mark Probst 7247919875 Repeatedly infer maps until nothing changes
When an inferred map is nested in another inferred map,
the inner one will usually not actually be made into a map
because its original class will be unified with another class
in the process of making the outer map.  On the other
hand, this unification can lead to more inner classes
becoming viable as maps.
2018-04-24 08:22:20 -07:00
Mark Probst 8a0df28496
Merge pull request #821 from quicktype/fix-all-properties-optional
Fix making all properties optional. Fixes #820
2018-04-24 11:10:47 -04:00
Mark Probst 5d6cc1f0b2 Fix making all properties optional. Fixes #820 2018-04-24 07:24:12 -07:00
Mark Probst 010b769515
Merge pull request #817 from quicktype/fix-extension-lang
Fix picking a language when using quicktype as a library
2018-04-23 13:26:04 -04:00
Mark Probst ab98f6a051 Fix picking a language when using quicktype as a library 2018-04-23 13:09:12 -04:00
Mark Probst 171c3409d0
Merge pull request #815 from quicktype/type-identity
Type identity
2018-04-20 17:49:38 -07:00
Mark Probst 1bfb11babf Ignore order when combining types 2018-04-20 06:12:59 -07:00
Mark Probst a50f22fbea Generalize merging of similar types during building
Before we had to special-case every type in the type
builder, now types just give their "identity", which is what
they want to be merged by, and the type builder only
needs one single map to loop up.
2018-04-20 06:12:59 -07:00
Mark Probst 6eafd61ecb
Merge pull request #814 from quicktype/combine-numbers
Combine numbers
2018-04-20 05:25:35 -07:00