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
Mark Probst
da7cc382c5
Unify number combining code, use it for map inference, too. Fixes #773
2018-04-19 22:41:50 -07:00
Mark Probst
a108cada66
Don't make unions of integers and doubles when combining classes
2018-04-19 21:42:27 -07:00
Mark Probst
de11285bf0
Combine doubles and integers deeper in types when combining classes
2018-04-19 21:40:18 -07:00
Mark Probst
2aa023784a
Merge pull request #812 from quicktype/static-converter
...
Make C# Converter static if possible. Fixes #776
2018-04-19 09:51:21 -07:00
Mark Probst
9cc334a84a
Add a test case
2018-04-19 09:49:41 -07:00
Mark Probst
8a216e7e40
Combine classes even if some properties have different number types
2018-04-19 09:48:36 -07:00
Mark Probst
f67a207123
Make C# Converter static if possible. Fixes #776
2018-04-19 09:27:18 -07:00
Mark Probst
d42cdc819c
Merge pull request #811 from quicktype/pimp-type-attributes
...
Use immutable for accessor names
2018-04-18 12:27:32 -07:00
Mark Probst
9fcc18d5de
Use immutable for accessor names
2018-04-18 12:05:05 -07:00
Mark Probst
ec6f34ccce
Merge pull request #810 from quicktype/better-schema-error-reporting
...
Better error reporting in JSON Schema input
2018-04-18 06:52:20 -07:00
Mark Probst
0cd5efa899
Merge pull request #809 from quicktype/update-ts-input
...
Update typescript-json-schema. Fixes #799
2018-04-17 23:01:06 -07:00
Mark Probst
6eb67c8b25
Better error reporting in JSON Schema input
2018-04-17 23:00:30 -07:00
Mark Probst
73bb023c79
Update typescript-json-schema. Fixes #799
2018-04-17 22:22:05 -07:00
David Siegel
e45ec93447
Merge pull request #807 from quicktype/unqualified-datetimeoffset
...
Use DateTimeOffset unqualified in C#
2018-04-18 07:17:17 +05:30
David Siegel
7e73c5a25e
Use DateTimeOffset unqualified in C#
...
Fixes #801
2018-04-18 06:54:10 +05:30
Mark Probst
6335ca5163
Merge pull request #806 from quicktype/add-schema-url
...
Add $schema to JSON Schema. Fixes #805
2018-04-17 16:24:49 -07:00
Mark Probst
5c59119a8b
Add $schema to JSON Schema
2018-04-17 10:19:18 -07:00
Mark Probst
f4ee8bc51d
Merge pull request #804 from quicktype/remove-swift-41
...
Remove Swift 4.1. Fixes #794
2018-04-16 21:55:29 -07:00
Mark Probst
b68a74fed7
Remove Swift 4.1. Fixes #794
2018-04-16 21:11:26 -07:00
Mark Probst
fbad2b4fa4
Merge pull request #803 from Enaero/master
...
[Java] Fix bug that always uses 'instantiateMapper' in Converter.java even when there are multiple classes being converted.
2018-04-16 20:07:52 -07:00
Enaero
2d911d6053
[Java] Fix bug that always uses 'instantiateMapper' in Converter.java even when there are multiple classes being converted.
2018-04-16 18:58:23 -07:00