diff --git a/maas-schemas-ts/package.json b/maas-schemas-ts/package.json index da95d68c9..60c0680e4 100644 --- a/maas-schemas-ts/package.json +++ b/maas-schemas-ts/package.json @@ -1,6 +1,6 @@ { "name": "maas-schemas-ts", - "version": "13.1.0", + "version": "13.2.0", "description": "TypeScript types and io-ts validators for maas-schemas", "main": "index.js", "files": [ diff --git a/maas-schemas-ts/src/core/components/state.ts b/maas-schemas-ts/src/core/components/state.ts index 852bd562d..4a93a17b9 100644 --- a/maas-schemas-ts/src/core/components/state.ts +++ b/maas-schemas-ts/src/core/components/state.ts @@ -157,6 +157,61 @@ export interface ItineraryStateBrand { readonly ItineraryState: unique symbol; } +// SubscriptionIntentState +// The life-cycle state of an subscription intent +export type SubscriptionIntentState = t.Branded< + string & + ( + | 'START' + | 'DETAILS' + | 'CUSTOMISATION' + | 'PAYMENT' + | 'AUTH' + | 'VERIFICATION' + | 'CANCELLED' + | 'CANCELLED_WITH_ERRORS' + | 'FINISHED' + ), + SubscriptionIntentStateBrand +>; +export const SubscriptionIntentState = t.brand( + t.intersection([ + t.string, + t.union([ + t.literal('START'), + t.literal('DETAILS'), + t.literal('CUSTOMISATION'), + t.literal('PAYMENT'), + t.literal('AUTH'), + t.literal('VERIFICATION'), + t.literal('CANCELLED'), + t.literal('CANCELLED_WITH_ERRORS'), + t.literal('FINISHED'), + ]), + ]), + ( + x, + ): x is t.Branded< + string & + ( + | 'START' + | 'DETAILS' + | 'CUSTOMISATION' + | 'PAYMENT' + | 'AUTH' + | 'VERIFICATION' + | 'CANCELLED' + | 'CANCELLED_WITH_ERRORS' + | 'FINISHED' + ), + SubscriptionIntentStateBrand + > => true, + 'SubscriptionIntentState', +); +export interface SubscriptionIntentStateBrand { + readonly SubscriptionIntentState: unique symbol; +} + // State // The default export. More information at the top. export type State = t.Branded; diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscription-intent.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscription-intent.ts new file mode 100644 index 000000000..1a4a6a705 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscription-intent.ts @@ -0,0 +1,186 @@ +/* + +undefined +MaaS subscription intent schema + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as State_ from 'maas-schemas-ts/core/components/state'; +import * as Units_ from 'maas-schemas-ts/core/components/units'; +import * as StateLog_ from 'maas-schemas-ts/core/components/state-log'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscription-intent.json'; + +// ItemId +// The purpose of this remains a mystery +export type ItemId = t.Branded; +export const ItemId = t.brand( + t.string, + (x): x is t.Branded => + (typeof x !== 'string' || x.length >= 1) && + (typeof x !== 'string' || x.length <= 255), + 'ItemId', +); +export interface ItemIdBrand { + readonly ItemId: unique symbol; +} + +// SubscriptionIntentCreate +// The purpose of this remains a mystery +export type SubscriptionIntentCreate = t.Branded< + { + planId?: ItemId; + planAddons?: Array; + state?: State_.SubscriptionIntentState; + startTime?: Units_.Time; + } & { + planId: Defined; + planAddons: Defined; + }, + SubscriptionIntentCreateBrand +>; +export const SubscriptionIntentCreate = t.brand( + t.intersection([ + t.partial({ + planId: ItemId, + planAddons: t.array(ItemId), + state: State_.SubscriptionIntentState, + startTime: Units_.Time, + }), + t.type({ + planId: Defined, + planAddons: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + planId?: ItemId; + planAddons?: Array; + state?: State_.SubscriptionIntentState; + startTime?: Units_.Time; + } & { + planId: Defined; + planAddons: Defined; + }, + SubscriptionIntentCreateBrand + > => true, + 'SubscriptionIntentCreate', +); +export interface SubscriptionIntentCreateBrand { + readonly SubscriptionIntentCreate: unique symbol; +} + +// SubscriptionIntentBase +// The purpose of this remains a mystery +export type SubscriptionIntentBase = t.Branded< + { + id?: Units_.Uuid; + identityId?: Units_.IdentityId; + subscriptionId?: Units_.IdentityId; + nextPlanId?: ItemId; + nextPlanAddons?: Array; + prevPlanId?: ItemId; + prevPlanAddons?: Array; + startTime?: Units_.Time; + state?: State_.SubscriptionIntentState; + stateLog?: StateLog_.StateLog; + created?: Units_.Time; + modified?: Units_.Time; + } & { + identityId: Defined; + subscriptionId: Defined; + nextPlanId: Defined; + nextPlanAddons: Defined; + }, + SubscriptionIntentBaseBrand +>; +export const SubscriptionIntentBase = t.brand( + t.intersection([ + t.partial({ + id: Units_.Uuid, + identityId: Units_.IdentityId, + subscriptionId: Units_.IdentityId, + nextPlanId: ItemId, + nextPlanAddons: t.array(ItemId), + prevPlanId: ItemId, + prevPlanAddons: t.array(ItemId), + startTime: Units_.Time, + state: State_.SubscriptionIntentState, + stateLog: StateLog_.StateLog, + created: Units_.Time, + modified: Units_.Time, + }), + t.type({ + identityId: Defined, + subscriptionId: Defined, + nextPlanId: Defined, + nextPlanAddons: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + id?: Units_.Uuid; + identityId?: Units_.IdentityId; + subscriptionId?: Units_.IdentityId; + nextPlanId?: ItemId; + nextPlanAddons?: Array; + prevPlanId?: ItemId; + prevPlanAddons?: Array; + startTime?: Units_.Time; + state?: State_.SubscriptionIntentState; + stateLog?: StateLog_.StateLog; + created?: Units_.Time; + modified?: Units_.Time; + } & { + identityId: Defined; + subscriptionId: Defined; + nextPlanId: Defined; + nextPlanAddons: Defined; + }, + SubscriptionIntentBaseBrand + > => true, + 'SubscriptionIntentBase', +); +export interface SubscriptionIntentBaseBrand { + readonly SubscriptionIntentBase: unique symbol; +} + +// SubscriptionIntent +// The default export. More information at the top. +export type SubscriptionIntent = t.Branded; +export const SubscriptionIntent = t.brand( + t.unknown, + (x): x is t.Branded => true, + 'SubscriptionIntent', +); +export interface SubscriptionIntentBrand { + readonly SubscriptionIntent: unique symbol; +} + +export default SubscriptionIntent; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-create/request.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-create/request.ts new file mode 100644 index 000000000..0110e5e10 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-create/request.ts @@ -0,0 +1,86 @@ +/* + +undefined +Request schema for subscriptions-intents-create + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as Units_ from 'maas-schemas-ts/core/components/units'; +import * as SubscriptionIntent_ from 'maas-schemas-ts/maas-backend/subscriptions/subscription-intent'; +import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-create/request.json'; + +// Request +// The default export. More information at the top. +export type Request = t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + payload?: SubscriptionIntent_.SubscriptionIntentCreate; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + payload: Defined; + }, + RequestBrand +>; +export const Request = t.brand( + t.intersection([ + t.partial({ + customerId: Units_.IdentityId, + userId: Units_.IdentityId, + payload: SubscriptionIntent_.SubscriptionIntentCreate, + headers: ApiCommon_.Headers, + }), + t.type({ + customerId: Defined, + userId: Defined, + payload: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + payload?: SubscriptionIntent_.SubscriptionIntentCreate; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + payload: Defined; + }, + RequestBrand + > => true, + 'Request', +); +export interface RequestBrand { + readonly Request: unique symbol; +} + +export default Request; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-create/response.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-create/response.ts new file mode 100644 index 000000000..e3d36cab2 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-create/response.ts @@ -0,0 +1,72 @@ +/* + +undefined +Response schema for subscriptions-intents-create + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as SubscriptionIntent_ from 'maas-schemas-ts/maas-backend/subscriptions/subscription-intent'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-create/response.json'; + +// Response +// The default export. More information at the top. +export type Response = t.Branded< + { + subscriptionIntent?: SubscriptionIntent_.SubscriptionIntentBase; + debug?: {}; + } & { + subscriptionIntent: Defined; + }, + ResponseBrand +>; +export const Response = t.brand( + t.intersection([ + t.partial({ + subscriptionIntent: SubscriptionIntent_.SubscriptionIntentBase, + debug: t.type({}), + }), + t.type({ + subscriptionIntent: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + subscriptionIntent?: SubscriptionIntent_.SubscriptionIntentBase; + debug?: {}; + } & { + subscriptionIntent: Defined; + }, + ResponseBrand + > => true, + 'Response', +); +export interface ResponseBrand { + readonly Response: unique symbol; +} + +export default Response; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-list/request.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-list/request.ts new file mode 100644 index 000000000..2015472aa --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-list/request.ts @@ -0,0 +1,88 @@ +/* + +undefined +Request schema for subscriptions-intents-list + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as Units_ from 'maas-schemas-ts/core/components/units'; +import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-list/request.json'; + +// Request +// The default export. More information at the top. +export type Request = t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + payload?: { + states?: string; + }; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + }, + RequestBrand +>; +export const Request = t.brand( + t.intersection([ + t.partial({ + customerId: Units_.IdentityId, + userId: Units_.IdentityId, + payload: t.partial({ + states: t.string, + }), + headers: ApiCommon_.Headers, + }), + t.type({ + customerId: Defined, + userId: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + payload?: { + states?: string; + }; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + }, + RequestBrand + > => true, + 'Request', +); +export interface RequestBrand { + readonly Request: unique symbol; +} + +export default Request; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-list/response.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-list/response.ts new file mode 100644 index 000000000..d25c29b24 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-list/response.ts @@ -0,0 +1,69 @@ +/* + +undefined +Response schema for subscriptions-intents-create + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as SubscriptionIntent_ from 'maas-schemas-ts/maas-backend/subscriptions/subscription-intent'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-list/response.json'; + +// Response +// The default export. More information at the top. +export type Response = t.Branded< + { + subscriptionIntents?: Array; + } & { + subscriptionIntents: Defined; + }, + ResponseBrand +>; +export const Response = t.brand( + t.intersection([ + t.partial({ + subscriptionIntents: t.array(SubscriptionIntent_.SubscriptionIntentBase), + }), + t.type({ + subscriptionIntents: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + subscriptionIntents?: Array; + } & { + subscriptionIntents: Defined; + }, + ResponseBrand + > => true, + 'Response', +); +export interface ResponseBrand { + readonly Response: unique symbol; +} + +export default Response; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-retrieve/request.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-retrieve/request.ts new file mode 100644 index 000000000..3cd2b3d10 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-retrieve/request.ts @@ -0,0 +1,85 @@ +/* + +undefined +Request schema for subscriptions-intents-retrieve + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as Units_ from 'maas-schemas-ts/core/components/units'; +import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-retrieve/request.json'; + +// Request +// The default export. More information at the top. +export type Request = t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + subscriptionIntentId?: Units_.Uuid; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + subscriptionIntentId: Defined; + }, + RequestBrand +>; +export const Request = t.brand( + t.intersection([ + t.partial({ + customerId: Units_.IdentityId, + userId: Units_.IdentityId, + subscriptionIntentId: Units_.Uuid, + headers: ApiCommon_.Headers, + }), + t.type({ + customerId: Defined, + userId: Defined, + subscriptionIntentId: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + subscriptionIntentId?: Units_.Uuid; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + subscriptionIntentId: Defined; + }, + RequestBrand + > => true, + 'Request', +); +export interface RequestBrand { + readonly Request: unique symbol; +} + +export default Request; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-retrieve/response.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-retrieve/response.ts new file mode 100644 index 000000000..01d478086 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-retrieve/response.ts @@ -0,0 +1,69 @@ +/* + +undefined +Response schema for subscriptions-intents-create + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as SubscriptionIntent_ from 'maas-schemas-ts/maas-backend/subscriptions/subscription-intent'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-retrieve/response.json'; + +// Response +// The default export. More information at the top. +export type Response = t.Branded< + { + subscriptionIntent?: SubscriptionIntent_.SubscriptionIntentBase; + } & { + subscriptionIntent: Defined; + }, + ResponseBrand +>; +export const Response = t.brand( + t.intersection([ + t.partial({ + subscriptionIntent: SubscriptionIntent_.SubscriptionIntentBase, + }), + t.type({ + subscriptionIntent: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + subscriptionIntent?: SubscriptionIntent_.SubscriptionIntentBase; + } & { + subscriptionIntent: Defined; + }, + ResponseBrand + > => true, + 'Response', +); +export interface ResponseBrand { + readonly Response: unique symbol; +} + +export default Response; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-update-state/request.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-update-state/request.ts new file mode 100644 index 000000000..d5a932afa --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-update-state/request.ts @@ -0,0 +1,97 @@ +/* + +undefined +Request schema for subscriptions-intents-update-state + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as Units_ from 'maas-schemas-ts/core/components/units'; +import * as ApiCommon_ from 'maas-schemas-ts/core/components/api-common'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-update-state/request.json'; + +// Request +// The default export. More information at the top. +export type Request = t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + subscriptionIntentId?: Units_.Uuid; + payload?: { + state?: string; + }; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + subscriptionIntentId: Defined; + payload: Defined; + }, + RequestBrand +>; +export const Request = t.brand( + t.intersection([ + t.partial({ + customerId: Units_.IdentityId, + userId: Units_.IdentityId, + subscriptionIntentId: Units_.Uuid, + payload: t.partial({ + state: t.string, + }), + headers: ApiCommon_.Headers, + }), + t.type({ + customerId: Defined, + userId: Defined, + subscriptionIntentId: Defined, + payload: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + customerId?: Units_.IdentityId; + userId?: Units_.IdentityId; + subscriptionIntentId?: Units_.Uuid; + payload?: { + state?: string; + }; + headers?: ApiCommon_.Headers; + } & { + customerId: Defined; + userId: Defined; + subscriptionIntentId: Defined; + payload: Defined; + }, + RequestBrand + > => true, + 'Request', +); +export interface RequestBrand { + readonly Request: unique symbol; +} + +export default Request; + +// Success diff --git a/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-update-state/response.ts b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-update-state/response.ts new file mode 100644 index 000000000..53d04d5b6 --- /dev/null +++ b/maas-schemas-ts/src/maas-backend/subscriptions/subscriptions-intents-update-state/response.ts @@ -0,0 +1,69 @@ +/* + +undefined +Response schema for subscriptions-intents-create + +!!! AUTO GENERATED BY CONVERT.TS REFRAIN FROM MANUAL EDITING !!! + +*/ + +import * as t from 'io-ts'; +import * as SubscriptionIntent_ from 'maas-schemas-ts/maas-backend/subscriptions/subscription-intent'; + +type Defined = + | Record + | Array + | string + | boolean + | number + | null; +const Defined = t.union([ + t.UnknownRecord, + t.UnknownArray, + t.string, + t.boolean, + t.number, + t.null, +]); + +export const schemaId = + 'http://maasglobal.com/maas-backend/subscriptions/subscriptions-intents-update-state/response.json'; + +// Response +// The default export. More information at the top. +export type Response = t.Branded< + { + subscriptionIntent?: SubscriptionIntent_.SubscriptionIntentBase; + } & { + subscriptionIntent: Defined; + }, + ResponseBrand +>; +export const Response = t.brand( + t.intersection([ + t.partial({ + subscriptionIntent: SubscriptionIntent_.SubscriptionIntentBase, + }), + t.type({ + subscriptionIntent: Defined, + }), + ]), + ( + x, + ): x is t.Branded< + { + subscriptionIntent?: SubscriptionIntent_.SubscriptionIntentBase; + } & { + subscriptionIntent: Defined; + }, + ResponseBrand + > => true, + 'Response', +); +export interface ResponseBrand { + readonly Response: unique symbol; +} + +export default Response; + +// Success diff --git a/maas-schemas-ts/translation.log b/maas-schemas-ts/translation.log index e6604f876..18d4b8455 100644 --- a/maas-schemas-ts/translation.log +++ b/maas-schemas-ts/translation.log @@ -1538,6 +1538,18 @@ WARNING: minItems field not supported outside top-level definitions in ./maas-backend/subscriptions/subscriptionOption.json INFO: missing description in ./maas-backend/subscriptions/subscriptionOption.json +INFO: primitive type "string" used outside top-level definitions + in ./maas-backend/subscriptions/subscriptions-intents-list/request.json +WARNING: minLength field not supported outside top-level definitions + in ./maas-backend/subscriptions/subscriptions-intents-list/request.json +WARNING: maxLength field not supported outside top-level definitions + in ./maas-backend/subscriptions/subscriptions-intents-list/request.json +INFO: primitive type "string" used outside top-level definitions + in ./maas-backend/subscriptions/subscriptions-intents-update-state/request.json +WARNING: minLength field not supported outside top-level definitions + in ./maas-backend/subscriptions/subscriptions-intents-update-state/request.json +WARNING: maxLength field not supported outside top-level definitions + in ./maas-backend/subscriptions/subscriptions-intents-update-state/request.json INFO: primitive type "string" used outside top-level definitions in ./maas-backend/subscriptions/subscriptions-options/request.json WARNING: minLength field not supported outside top-level definitions @@ -1546,6 +1558,12 @@ WARNING: maxLength field not supported outside top-level definitions in ./maas-backend/subscriptions/subscriptions-options/request.json WARNING: default field not supported outside top-level definitions in ./maas-backend/subscriptions/subscriptions-retrieve/request.json +INFO: missing description + in ./maas-backend/subscriptions/subscription-intent.json +INFO: missing description + in ./maas-backend/subscriptions/subscription-intent.json +INFO: missing description + in ./maas-backend/subscriptions/subscription-intent.json INFO: primitive type "string" used outside top-level definitions in ./maas-backend/vehicle/vehicle-alert/request.json WARNING: minLength field not supported outside top-level definitions diff --git a/maas-schemas/schemas/maas-backend/subscriptions/subscription-intent.json b/maas-schemas/schemas/maas-backend/subscriptions/subscription-intent.json index 63af394fb..0462165cc 100644 --- a/maas-schemas/schemas/maas-backend/subscriptions/subscription-intent.json +++ b/maas-schemas/schemas/maas-backend/subscriptions/subscription-intent.json @@ -19,9 +19,9 @@ }, "startTime": { "$ref": "http://maasglobal.com/core/components/units.json#/definitions/time" - }, - "required": ["planId", "planAddons"] - } + } + }, + "required": ["planId", "planAddons"] }, "subscriptionIntentBase": { "type": "object", diff --git a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-create/response.json b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-create/response.json index 92e454a9a..c62aa4ee6 100644 --- a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-create/response.json +++ b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-create/response.json @@ -4,7 +4,7 @@ "type": "object", "properties": { "subscriptionIntent": { - "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription.json#/definitions/subscriptionIntentBase" + "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription-intent.json#/definitions/subscriptionIntentBase" }, "debug": { "type": "object", diff --git a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-list/response.json b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-list/response.json index 39e7cd218..8f13bce3d 100644 --- a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-list/response.json +++ b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-list/response.json @@ -6,7 +6,7 @@ "subscriptionIntents": { "type": "array", "items": { - "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription.json#/definitions/subscriptionIntentBase" + "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription-intent.json#/definitions/subscriptionIntentBase" } } }, diff --git a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-retrieve/response.json b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-retrieve/response.json index 3fdf5ef63..f26e87e8f 100644 --- a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-retrieve/response.json +++ b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-retrieve/response.json @@ -4,7 +4,7 @@ "type": "object", "properties": { "subscriptionIntent": { - "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription.json#/definitions/subscriptionIntentBase" + "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription-intent.json#/definitions/subscriptionIntentBase" } }, "required": ["subscriptionIntent"], diff --git a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-update-state/response.json b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-update-state/response.json index 209d344f4..6efab9718 100644 --- a/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-update-state/response.json +++ b/maas-schemas/schemas/maas-backend/subscriptions/subscriptions-intents-update-state/response.json @@ -4,7 +4,7 @@ "type": "object", "properties": { "subscriptionIntent": { - "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription.json#/definitions/subscriptionIntentBase" + "$ref": "http://maasglobal.com/maas-backend/subscriptions/subscription-intent.json#/definitions/subscriptionIntentBase" } }, "required": ["subscriptionIntent"],