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

2212 Коммитов

Автор SHA1 Сообщение Дата
Mark Probst e493afa22e Fix build 2018-04-11 17:15:10 -07:00
Mark Probst c342b03364
Merge pull request #786 from quicktype/typescript-json-schema-commit
Refer to an explicit typescript-json-schema commit
2018-04-11 17:10:57 -07:00
Mark Probst 8485f2e7a9 Make compiler errors fail the build 2018-04-11 17:09:48 -07:00
Mark Probst 5e4eccee03 Update typescript-json-schema
Fixes #780
Fixes #742
2018-04-11 16:52:30 -07:00
Mark Probst afc3b93ee3 Refer to an explicit typescript-json-schema commit
Otherwise we can't reproduce builds.
2018-04-11 16:31:25 -07:00
Mark Probst 6d1cf62328
Merge pull request #785 from quicktype/simplify-types
Simplify TypeRef
2018-04-11 16:29:56 -07:00
Mark Probst 78fffa1c4b Simple fix 2018-04-11 15:53:48 -07:00
Mark Probst 934141538d
Merge pull request #784 from quicktype/fix-gather-names
Make gatherNames a lot faster and hopefully better. Fixes #751
2018-04-11 15:50:38 -07:00
Mark Probst 61af96b4e8 Use TypeRef.index instead of TypeRef.getIndex() 2018-04-11 15:40:46 -07:00
Mark Probst dbc2ce5e63 Remove superfluous code 2018-04-11 15:32:02 -07:00
Mark Probst fe436da94b Make name order more similar than what we had before 2018-04-11 15:28:35 -07:00
Mark Probst b602668279 Fix choice of ancestors for naming 2018-04-11 14:54:26 -07:00
Mark Probst af9f3fad84 Always use given names when propagating, if available 2018-04-11 14:20:34 -07:00
Mark Probst 8bc4127a64 Make gatherNames a lot faster and hopefully better
The complexity of the new algorithm should be lower, and we put a cap
on the number of names we gather for a type before we assign a random
name (20 currently).
2018-04-11 14:08:55 -07:00
Mark Probst 91c7129703
Merge pull request #782 from quicktype/no-contagious-urijs
Separate stuff so as not to have a contagious urijs dep
2018-04-11 13:49:21 -07:00
Mark Probst 90d28ab2c6 Re-export TypeSource from index. Fixes #783 2018-04-11 13:12:58 -07:00
Mark Probst c271e59bde Separate stuff so as not to have contagious a urijs dep 2018-04-11 13:07:16 -07:00
Mark Probst 8469ea2812
Merge pull request #781 from quicktype/small-debugging-stuff
Small printf-debugging fix
2018-04-10 19:49:50 -07:00
Mark Probst 93c83cd6ec Small printf-debugging fix 2018-04-10 19:12:36 -07:00
Mark Probst 0d5c4fd4ef
Merge pull request #719 from quicktype/fix-graph-rewrite
Fix a graph rewriting bug.  Fixes #713
2018-04-10 13:00:00 -07:00
Mark Probst f82e4b93a0 Register "unique" types for deduplication once their children are set 2018-04-10 11:46:11 -07:00
Mark Probst 3a43933ed0 Fix TypeRef cycle. Fixes #713
We don't do unresolved type refs anymore.  In cases where we do need
a forwarding ref, we make an intersection type that we then put a single
member in.
2018-04-10 11:40:56 -07:00
Mark Probst 18b17ad01b Refactor type building
We now always construct a "unique" type before reconstituting the
original type's children.  That way we can't get into direct loops
anymore that we need to avoid with obscure machinery.
2018-04-10 11:38:52 -07:00
Mark Probst 50471d767a
Merge pull request #779 from quicktype/less-stupid-name-combining
Less stupid name combining
2018-04-09 18:48:09 -07:00
Mark Probst 2c8d9b6fb0 Use normalized, separated names for combining names. Fixes #407 2018-04-09 18:28:53 -07:00
Mark Probst 6b268457c0 Fix TS->Schema short circuit 2018-04-09 16:56:37 -07:00
Mark Probst bda6b78549
Merge pull request #777 from quicktype/remove-dead-code
Remove dead code
2018-04-09 11:56:29 -07:00
Mark Probst 58d312b339 Remove dead code 2018-04-09 10:14:25 -07:00
Mark Probst 75cc48f7e0
Merge pull request #775 from quicktype/multiple-schema-inputs
Fix titles from TS schemas
2018-04-08 21:33:19 -07:00
Mark Probst 418f82918c
Merge pull request #772 from quicktype/typescript-full-objects
Full object support for JS languages.  Fixes #764
2018-04-08 21:10:12 -07:00
Mark Probst 2a10724d76 Reformat 2018-04-08 21:05:21 -07:00
Mark Probst 373407453c Make names from title where there's a $ref inferred
If there's a $ref with the title, but the target of the $ref
also has a title, the latter should get precedence.
2018-04-08 21:05:21 -07:00
Mark Probst 321e7828bb
Merge pull request #770 from quicktype/multiple-schema-inputs
Multiple JSON Schema inputs.  Fixes #711
2018-04-08 21:02:22 -07:00
Mark Probst cc1dabedc4 Support specifying top-levels explicitly in TS input
If there are types that have doc comments containing
`#TopLevel`, then only those types will be made top-levels.
2018-04-08 20:13:09 -07:00
Mark Probst d210f45ad6 Cosmetic fix 2018-04-08 18:26:39 -07:00
Mark Probst a46c3d455a Fix a couple of TSLint issues 2018-04-08 14:27:36 -07:00
Mark Probst 64fbff51db Use TS namespace, not module, in generated code
It seems that modules should only be used explicitly in
type definition files.
2018-04-08 13:43:06 -07:00
Mark Probst cb7efd4451
Merge pull request #774 from quicktype/fix-typescript-input
Fix a stupid error.  Fixes #736
2018-04-08 13:22:21 -07:00
Mark Probst b89e99c8d2 Fix a stupid error. Fixes #736 2018-04-08 13:02:37 -07:00
Mark Probst dd3f5e22eb Add ref to all JSON Schema errors that are missing it. Fixes #745 2018-04-08 12:29:58 -07:00
Mark Probst 2ec35dc01e Put ref into messages when we fail to follow a ref 2018-04-08 12:10:28 -07:00
Mark Probst 88dc26f315 Yet another improved JSON Schema error message 2018-04-08 12:05:15 -07:00
Mark Probst 6fa0768602 More better JSON Schema error messages 2018-04-08 11:58:05 -07:00
Mark Probst 16d157793b Add ref to some Schema error messages 2018-04-08 11:42:03 -07:00
Mark Probst 8b37b86f62 Support full object types in JS validation, and fix bugs 2018-04-08 10:47:56 -07:00
Mark Probst 6cbf72e5d8 Make forEachClassProperty work on ObjectType, too 2018-04-08 08:59:21 -07:00
Mark Probst 354b8ea23d Better type representation in JS output
Unify object type representation, and make a general
reference "type" so we can represent all kinds of cycles
later on.
2018-04-07 22:53:58 -07:00
Mark Probst b6180dd6df Prefix error messages with domain 2018-04-07 20:32:30 -07:00
Mark Probst 9e813ef86f Better error messages for Schema input 2018-04-07 20:20:07 -07:00
Mark Probst 0d593e27f1 Get rid of topLevelRefs, do that from the Schema URIs
When before you had to specify

    --add-schema-top-level /definitions/ ./my-schema.json

you can now just specify

    "./my-schema.json#/definitions/"

The rule is that if there's a slash at the end, all the properties
of that object there are taken as types.  If the slash is
missing, the object itself if the type.  The exception is
the root path, which is always taken directly as a type,
whether or not a slash is there, i.e. these are all the same,
and specify just one type:

    ./my-schema.json
    ./my-schema.json#
    ./my-schema.json#/
2018-04-07 19:29:28 -07:00