Skip to content

Commit

Permalink
Amendments
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhtr committed Jun 3, 2020
1 parent 964ced1 commit 4046b0a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 23 deletions.
3 changes: 0 additions & 3 deletions maas-schemas-ts/src/core/itinerary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export type Itinerary = t.Branded<
superMode?: TravelMode_.SuperMode;
tags?: Array<string>;
label?: string;
n?: number;
isWhimRide?: boolean;
provider?: string;
} & {
Expand Down Expand Up @@ -124,7 +123,6 @@ export const Itinerary = t.brand(
superMode: TravelMode_.SuperMode,
tags: t.array(t.string),
label: t.string,
n: t.number,
isWhimRide: t.boolean,
provider: t.string,
}),
Expand Down Expand Up @@ -158,7 +156,6 @@ export const Itinerary = t.brand(
superMode?: TravelMode_.SuperMode;
tags?: Array<string>;
label?: string;
n?: number;
isWhimRide?: boolean;
provider?: string;
} & {
Expand Down
13 changes: 7 additions & 6 deletions maas-schemas-ts/src/maas-backend/routes/routes-query/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as UnitsGeo_ from 'maas-schemas-ts/core/components/units-geo';
import * as Address_ from 'maas-schemas-ts/core/components/address';
import * as Station_ from 'maas-schemas-ts/core/components/station';
import * as Units_ from 'maas-schemas-ts/core/components/units';
import * as TravelMode_ from 'maas-schemas-ts/core/components/travel-mode';
import * as Common_ from 'maas-schemas-ts/core/components/common';
import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common';

Expand Down Expand Up @@ -50,7 +51,7 @@ export type Payload = t.Branded<
arriveBy?: Units_.Time;
leaveAtReturn?: Units_.Time;
arriveByReturn?: Units_.Time;
modes?: string;
modes?: TravelMode_.SuperMode;
transitMode?: string & ('TRAIN' | 'BUS' | 'SUBWAY' | 'TRAM' | 'RAIL');
options?: {};
bookingIdToExtend?: Units_.Uuid;
Expand All @@ -69,7 +70,7 @@ export type Payload = t.Branded<
| Units_.Time
| Units_.Time
| Units_.Time
| string
| TravelMode_.SuperMode
| (string & ('TRAIN' | 'BUS' | 'SUBWAY' | 'TRAM' | 'RAIL'))
| {}
| Units_.Uuid
Expand All @@ -93,7 +94,7 @@ export const Payload = t.brand(
arriveBy: Units_.Time,
leaveAtReturn: Units_.Time,
arriveByReturn: Units_.Time,
modes: t.string,
modes: TravelMode_.SuperMode,
transitMode: t.intersection([
t.string,
t.union([
Expand Down Expand Up @@ -123,7 +124,7 @@ export const Payload = t.brand(
Units_.Time,
Units_.Time,
Units_.Time,
t.string,
TravelMode_.SuperMode,
t.intersection([
t.string,
t.union([
Expand Down Expand Up @@ -157,7 +158,7 @@ export const Payload = t.brand(
arriveBy?: Units_.Time;
leaveAtReturn?: Units_.Time;
arriveByReturn?: Units_.Time;
modes?: string;
modes?: TravelMode_.SuperMode;
transitMode?: string & ('TRAIN' | 'BUS' | 'SUBWAY' | 'TRAM' | 'RAIL');
options?: {};
bookingIdToExtend?: Units_.Uuid;
Expand All @@ -176,7 +177,7 @@ export const Payload = t.brand(
| Units_.Time
| Units_.Time
| Units_.Time
| string
| TravelMode_.SuperMode
| (string & ('TRAIN' | 'BUS' | 'SUBWAY' | 'TRAM' | 'RAIL'))
| {}
| Units_.Uuid
Expand Down
8 changes: 0 additions & 8 deletions maas-schemas-ts/translation.log
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,6 @@ INFO: primitive type "string" used outside top-level definitions
in ./core/itinerary.json
WARNING: minLength field not supported outside top-level definitions
in ./core/itinerary.json
INFO: primitive type "number" used outside top-level definitions
in ./core/itinerary.json
WARNING: minimum field not supported outside top-level definitions
in ./core/itinerary.json
INFO: primitive type "string" used outside top-level definitions
in ./core/itinerary.json
INFO: missing description
Expand Down Expand Up @@ -1406,14 +1402,10 @@ WARNING: maxItems field not supported outside top-level definitions
in ./maas-backend/push-notification/request.json
INFO: primitive type "string" used outside top-level definitions
in ./maas-backend/routes/routes-query/request.json
INFO: primitive type "string" used outside top-level definitions
in ./maas-backend/routes/routes-query/request.json
WARNING: patternProperty support has limitations
in ./maas-backend/routes/routes-query/request.json
INFO: primitive type "string" used outside top-level definitions
in ./maas-backend/routes/routes-query/request.json
INFO: primitive type "string" used outside top-level definitions
in ./maas-backend/routes/routes-query/request.json
INFO: missing description
in ./maas-backend/routes/routes-query/request.json
INFO: primitive type "integer" used outside top-level definitions
Expand Down
4 changes: 0 additions & 4 deletions maas-schemas/schemas/core/itinerary.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@
"type": "string",
"minLength": 1
},
"n": {
"type": "number",
"minimum": 0
},
"isWhimRide": {
"type": "boolean"
},
Expand Down
3 changes: 2 additions & 1 deletion maas-schemas/schemas/core/leg.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"type": "string"
},
"co2": {
"type": "number"
"type": "number",
"minimum": 0
},
"legGeometry": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"$ref": "http://maasglobal.com/core/components/units.json#/definitions/time"
},
"modes": {
"type": "string"
"$ref": "http://maasglobal.com/core/components/travel-mode.json#/definitions/superMode"
},
"transitMode": {
"type": "string",
Expand Down

0 comments on commit 4046b0a

Please sign in to comment.