Alan Agius ca4bdcac84 fix(@angular-devkit/core): retain order of types set in allOf, anyOf and oneOf when parsing schema
With this change we retain the order of types are declared in the schema.
Ex:
```json
"oneOf": [
  {
    "type": "boolean"
  },
  {
    "type": "string",
    "description": "The name of the migration to run."
  }
]
```

Currently this will result in:
```js
{ type: "string", types: ["string", "boolean"] }
```

This is because we use the order of types from the `allTypes` contant variable.a3a657f7e7/packages/angular_devkit/core/src/json/schema/utility.ts (L12)

Now this will result in:
```js
{ type: "boolean", types: ["boolean", "string"] };
```

The CLI parser will iterate over each type and will set a value of true if `--migrate-only` option is provided.

Related test in the CLL parser

1d105eb569/packages/angular/cli/models/parser_spec.ts (L34)

1d105eb569/packages/angular/cli/models/parser_spec.ts (L132-L138)
2019-11-15 10:43:07 -08:00
..