Update openapi-generator to 7.6. (#3905)

This removes a circular import and should let us remove the xsrfMiddleware (#3641).
This commit is contained in:
Jeffrey Yasskin 2024-05-23 11:53:11 -07:00 коммит произвёл GitHub
Родитель 4422f17235
Коммит 17685db1dd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
33 изменённых файлов: 408 добавлений и 506 удалений

Просмотреть файл

@ -1 +1 @@
7.2.0
7.6.0

Просмотреть файл

@ -15,7 +15,7 @@ Module system
* CommonJS
* ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
### Building
@ -27,7 +27,7 @@ npm run build
### Publishing
First build the package then run ```npm publish```
First build the package then run `npm publish`
### Consuming
@ -43,3 +43,4 @@ _unPublished (not recommended):_
```
npm install PATH_TO_GENERATED_PACKAGE --save
```

Просмотреть файл

@ -188,12 +188,18 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
* Add a user to a component
*/
async addUserToComponentRaw(requestParameters: AddUserToComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.componentId === null || requestParameters.componentId === undefined) {
throw new runtime.RequiredError('componentId','Required parameter requestParameters.componentId was null or undefined when calling addUserToComponent.');
if (requestParameters['componentId'] == null) {
throw new runtime.RequiredError(
'componentId',
'Required parameter "componentId" was null or undefined when calling addUserToComponent().'
);
}
if (requestParameters.userId === null || requestParameters.userId === undefined) {
throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling addUserToComponent.');
if (requestParameters['userId'] == null) {
throw new runtime.RequiredError(
'userId',
'Required parameter "userId" was null or undefined when calling addUserToComponent().'
);
}
const queryParameters: any = {};
@ -203,15 +209,15 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Xsrf-Token"] = this.configuration.apiKey("X-Xsrf-Token"); // XsrfToken authentication
headerParameters["X-Xsrf-Token"] = await this.configuration.apiKey("X-Xsrf-Token"); // XsrfToken authentication
}
const response = await this.request({
path: `/components/{componentId}/users/{userId}`.replace(`{${"componentId"}}`, encodeURIComponent(String(requestParameters.componentId))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
path: `/components/{componentId}/users/{userId}`.replace(`{${"componentId"}}`, encodeURIComponent(String(requestParameters['componentId']))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: ComponentUsersRequestToJSON(requestParameters.componentUsersRequest),
body: ComponentUsersRequestToJSON(requestParameters['componentUsersRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);
@ -233,7 +239,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Xsrf-Token"] = this.configuration.apiKey("X-Xsrf-Token"); // XsrfToken authentication
headerParameters["X-Xsrf-Token"] = await this.configuration.apiKey("X-Xsrf-Token"); // XsrfToken authentication
}
const response = await this.request({
@ -258,8 +264,11 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
* List features whose external reviews are incomplete
*/
async listExternalReviewsRaw(requestParameters: ListExternalReviewsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ExternalReviewsResponse>> {
if (requestParameters.reviewGroup === null || requestParameters.reviewGroup === undefined) {
throw new runtime.RequiredError('reviewGroup','Required parameter requestParameters.reviewGroup was null or undefined when calling listExternalReviews.');
if (requestParameters['reviewGroup'] == null) {
throw new runtime.RequiredError(
'reviewGroup',
'Required parameter "reviewGroup" was null or undefined when calling listExternalReviews().'
);
}
const queryParameters: any = {};
@ -267,7 +276,7 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
const headerParameters: runtime.HTTPHeaders = {};
const response = await this.request({
path: `/external_reviews/{review_group}`.replace(`{${"review_group"}}`, encodeURIComponent(String(requestParameters.reviewGroup))),
path: `/external_reviews/{review_group}`.replace(`{${"review_group"}}`, encodeURIComponent(String(requestParameters['reviewGroup']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
@ -288,22 +297,28 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
* List how long each feature took to launch
*/
async listFeatureLatencyRaw(requestParameters: ListFeatureLatencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<FeatureLatency>>> {
if (requestParameters.startAt === null || requestParameters.startAt === undefined) {
throw new runtime.RequiredError('startAt','Required parameter requestParameters.startAt was null or undefined when calling listFeatureLatency.');
if (requestParameters['startAt'] == null) {
throw new runtime.RequiredError(
'startAt',
'Required parameter "startAt" was null or undefined when calling listFeatureLatency().'
);
}
if (requestParameters.endAt === null || requestParameters.endAt === undefined) {
throw new runtime.RequiredError('endAt','Required parameter requestParameters.endAt was null or undefined when calling listFeatureLatency.');
if (requestParameters['endAt'] == null) {
throw new runtime.RequiredError(
'endAt',
'Required parameter "endAt" was null or undefined when calling listFeatureLatency().'
);
}
const queryParameters: any = {};
if (requestParameters.startAt !== undefined) {
queryParameters['startAt'] = (requestParameters.startAt as any).toISOString().substring(0,10);
if (requestParameters['startAt'] != null) {
queryParameters['startAt'] = (requestParameters['startAt'] as any).toISOString().substring(0,10);
}
if (requestParameters.endAt !== undefined) {
queryParameters['endAt'] = (requestParameters.endAt as any).toISOString().substring(0,10);
if (requestParameters['endAt'] != null) {
queryParameters['endAt'] = (requestParameters['endAt'] as any).toISOString().substring(0,10);
}
const headerParameters: runtime.HTTPHeaders = {};
@ -358,8 +373,8 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
async listSpecMentorsRaw(requestParameters: ListSpecMentorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SpecMentor>>> {
const queryParameters: any = {};
if (requestParameters.after !== undefined) {
queryParameters['after'] = (requestParameters.after as any).toISOString().substring(0,10);
if (requestParameters['after'] != null) {
queryParameters['after'] = (requestParameters['after'] as any).toISOString().substring(0,10);
}
const headerParameters: runtime.HTTPHeaders = {};
@ -386,12 +401,18 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
* Remove a user from a component
*/
async removeUserFromComponentRaw(requestParameters: RemoveUserFromComponentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters.componentId === null || requestParameters.componentId === undefined) {
throw new runtime.RequiredError('componentId','Required parameter requestParameters.componentId was null or undefined when calling removeUserFromComponent.');
if (requestParameters['componentId'] == null) {
throw new runtime.RequiredError(
'componentId',
'Required parameter "componentId" was null or undefined when calling removeUserFromComponent().'
);
}
if (requestParameters.userId === null || requestParameters.userId === undefined) {
throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeUserFromComponent.');
if (requestParameters['userId'] == null) {
throw new runtime.RequiredError(
'userId',
'Required parameter "userId" was null or undefined when calling removeUserFromComponent().'
);
}
const queryParameters: any = {};
@ -401,15 +422,15 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-Xsrf-Token"] = this.configuration.apiKey("X-Xsrf-Token"); // XsrfToken authentication
headerParameters["X-Xsrf-Token"] = await this.configuration.apiKey("X-Xsrf-Token"); // XsrfToken authentication
}
const response = await this.request({
path: `/components/{componentId}/users/{userId}`.replace(`{${"componentId"}}`, encodeURIComponent(String(requestParameters.componentId))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
path: `/components/{componentId}/users/{userId}`.replace(`{${"componentId"}}`, encodeURIComponent(String(requestParameters['componentId']))).replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters['userId']))),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
body: ComponentUsersRequestToJSON(requestParameters.componentUsersRequest),
body: ComponentUsersRequestToJSON(requestParameters['componentUsersRequest']),
}, initOverrides);
return new runtime.VoidApiResponse(response);

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
* Traits about the user in relation to the component
* @export
@ -30,10 +30,8 @@ export interface ComponentUsersRequest {
/**
* Check if a given object implements the ComponentUsersRequest interface.
*/
export function instanceOfComponentUsersRequest(value: object): boolean {
let isInstance = true;
return isInstance;
export function instanceOfComponentUsersRequest(value: object): value is ComponentUsersRequest {
return true;
}
export function ComponentUsersRequestFromJSON(json: any): ComponentUsersRequest {
@ -41,25 +39,22 @@ export function ComponentUsersRequestFromJSON(json: any): ComponentUsersRequest
}
export function ComponentUsersRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComponentUsersRequest {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'owner': !exists(json, 'owner') ? undefined : json['owner'],
'owner': json['owner'] == null ? undefined : json['owner'],
};
}
export function ComponentUsersRequestToJSON(value?: ComponentUsersRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'owner': value.owner,
'owner': value['owner'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -42,13 +42,11 @@ export interface ComponentsUser {
/**
* Check if a given object implements the ComponentsUser interface.
*/
export function instanceOfComponentsUser(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "email" in value;
return isInstance;
export function instanceOfComponentsUser(value: object): value is ComponentsUser {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('email' in value) || value['email'] === undefined) return false;
return true;
}
export function ComponentsUserFromJSON(json: any): ComponentsUser {
@ -56,7 +54,7 @@ export function ComponentsUserFromJSON(json: any): ComponentsUser {
}
export function ComponentsUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComponentsUser {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -68,17 +66,14 @@ export function ComponentsUserFromJSONTyped(json: any, ignoreDiscriminator: bool
}
export function ComponentsUserToJSON(value?: ComponentsUser | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'id': value.id,
'name': value.name,
'email': value.email,
'id': value['id'],
'name': value['name'],
'email': value['email'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { ComponentsUser } from './ComponentsUser';
import {
ComponentsUserFromJSON,
@ -49,10 +49,8 @@ export interface ComponentsUsersResponse {
/**
* Check if a given object implements the ComponentsUsersResponse interface.
*/
export function instanceOfComponentsUsersResponse(value: object): boolean {
let isInstance = true;
return isInstance;
export function instanceOfComponentsUsersResponse(value: object): value is ComponentsUsersResponse {
return true;
}
export function ComponentsUsersResponseFromJSON(json: any): ComponentsUsersResponse {
@ -60,27 +58,24 @@ export function ComponentsUsersResponseFromJSON(json: any): ComponentsUsersRespo
}
export function ComponentsUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComponentsUsersResponse {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'users': !exists(json, 'users') ? undefined : ((json['users'] as Array<any>).map(ComponentsUserFromJSON)),
'components': !exists(json, 'components') ? undefined : ((json['components'] as Array<any>).map(OwnersAndSubscribersOfComponentFromJSON)),
'users': json['users'] == null ? undefined : ((json['users'] as Array<any>).map(ComponentsUserFromJSON)),
'components': json['components'] == null ? undefined : ((json['components'] as Array<any>).map(OwnersAndSubscribersOfComponentFromJSON)),
};
}
export function ComponentsUsersResponseToJSON(value?: ComponentsUsersResponse | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'users': value.users === undefined ? undefined : ((value.users as Array<any>).map(ComponentsUserToJSON)),
'components': value.components === undefined ? undefined : ((value.components as Array<any>).map(OwnersAndSubscribersOfComponentToJSON)),
'users': value['users'] == null ? undefined : ((value['users'] as Array<any>).map(ComponentsUserToJSON)),
'components': value['components'] == null ? undefined : ((value['components'] as Array<any>).map(OwnersAndSubscribersOfComponentToJSON)),
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreview } from './LinkPreview';
import {
LinkPreviewFromJSON,
@ -49,12 +49,10 @@ export interface ExternalReviewsResponse {
/**
* Check if a given object implements the ExternalReviewsResponse interface.
*/
export function instanceOfExternalReviewsResponse(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "reviews" in value;
isInstance = isInstance && "link_previews" in value;
return isInstance;
export function instanceOfExternalReviewsResponse(value: object): value is ExternalReviewsResponse {
if (!('reviews' in value) || value['reviews'] === undefined) return false;
if (!('link_previews' in value) || value['link_previews'] === undefined) return false;
return true;
}
export function ExternalReviewsResponseFromJSON(json: any): ExternalReviewsResponse {
@ -62,7 +60,7 @@ export function ExternalReviewsResponseFromJSON(json: any): ExternalReviewsRespo
}
export function ExternalReviewsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExternalReviewsResponse {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -73,16 +71,13 @@ export function ExternalReviewsResponseFromJSONTyped(json: any, ignoreDiscrimina
}
export function ExternalReviewsResponseToJSON(value?: ExternalReviewsResponse | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'reviews': ((value.reviews as Array<any>).map(OutstandingReviewToJSON)),
'link_previews': ((value.link_previews as Array<any>).map(LinkPreviewToJSON)),
'reviews': ((value['reviews'] as Array<any>).map(OutstandingReviewToJSON)),
'link_previews': ((value['link_previews'] as Array<any>).map(LinkPreviewToJSON)),
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { FeatureLink } from './FeatureLink';
import {
FeatureLinkFromJSON,
@ -61,15 +61,13 @@ export interface FeatureLatency {
/**
* Check if a given object implements the FeatureLatency interface.
*/
export function instanceOfFeatureLatency(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "feature" in value;
isInstance = isInstance && "entry_created_date" in value;
isInstance = isInstance && "shipped_milestone" in value;
isInstance = isInstance && "shipped_date" in value;
isInstance = isInstance && "owner_emails" in value;
return isInstance;
export function instanceOfFeatureLatency(value: object): value is FeatureLatency {
if (!('feature' in value) || value['feature'] === undefined) return false;
if (!('entry_created_date' in value) || value['entry_created_date'] === undefined) return false;
if (!('shipped_milestone' in value) || value['shipped_milestone'] === undefined) return false;
if (!('shipped_date' in value) || value['shipped_date'] === undefined) return false;
if (!('owner_emails' in value) || value['owner_emails'] === undefined) return false;
return true;
}
export function FeatureLatencyFromJSON(json: any): FeatureLatency {
@ -77,7 +75,7 @@ export function FeatureLatencyFromJSON(json: any): FeatureLatency {
}
export function FeatureLatencyFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeatureLatency {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -91,19 +89,16 @@ export function FeatureLatencyFromJSONTyped(json: any, ignoreDiscriminator: bool
}
export function FeatureLatencyToJSON(value?: FeatureLatency | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'feature': FeatureLinkToJSON(value.feature),
'entry_created_date': (value.entry_created_date.toISOString().substring(0,10)),
'shipped_milestone': value.shipped_milestone,
'shipped_date': (value.shipped_date.toISOString().substring(0,10)),
'owner_emails': value.owner_emails,
'feature': FeatureLinkToJSON(value['feature']),
'entry_created_date': ((value['entry_created_date']).toISOString().substring(0,10)),
'shipped_milestone': value['shipped_milestone'],
'shipped_date': ((value['shipped_date']).toISOString().substring(0,10)),
'owner_emails': value['owner_emails'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -36,12 +36,10 @@ export interface FeatureLink {
/**
* Check if a given object implements the FeatureLink interface.
*/
export function instanceOfFeatureLink(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
return isInstance;
export function instanceOfFeatureLink(value: object): value is FeatureLink {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
export function FeatureLinkFromJSON(json: any): FeatureLink {
@ -49,7 +47,7 @@ export function FeatureLinkFromJSON(json: any): FeatureLink {
}
export function FeatureLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeatureLink {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -60,16 +58,13 @@ export function FeatureLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean
}
export function FeatureLinkToJSON(value?: FeatureLink | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'id': value.id,
'name': value.name,
'id': value['id'],
'name': value['name'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -36,12 +36,10 @@ export interface GateLatency {
/**
* Check if a given object implements the GateLatency interface.
*/
export function instanceOfGateLatency(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "gate_type" in value;
isInstance = isInstance && "latency_days" in value;
return isInstance;
export function instanceOfGateLatency(value: object): value is GateLatency {
if (!('gate_type' in value) || value['gate_type'] === undefined) return false;
if (!('latency_days' in value) || value['latency_days'] === undefined) return false;
return true;
}
export function GateLatencyFromJSON(json: any): GateLatency {
@ -49,7 +47,7 @@ export function GateLatencyFromJSON(json: any): GateLatency {
}
export function GateLatencyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GateLatency {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -60,16 +58,13 @@ export function GateLatencyFromJSONTyped(json: any, ignoreDiscriminator: boolean
}
export function GateLatencyToJSON(value?: GateLatency | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'gate_type': value.gate_type,
'latency_days': value.latency_days,
'gate_type': value['gate_type'],
'latency_days': value['latency_days'],
};
}

Просмотреть файл

@ -12,18 +12,15 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import {
LinkPreviewGithubIssueFromJSONTyped,
LinkPreviewGithubMarkdownFromJSONTyped,
LinkPreviewGithubPullRequestFromJSONTyped,
LinkPreviewGoogleDocsFromJSONTyped,
LinkPreviewMdnDocsFromJSONTyped,
LinkPreviewMozillaBugFromJSONTyped,
LinkPreviewSpecsFromJSONTyped,
LinkPreviewWebkitBugFromJSONTyped
} from './index';
import { mapValues } from '../runtime';
import { LinkPreviewGithubIssueFromJSONTyped } from './LinkPreviewGithubIssue';
import { LinkPreviewGithubMarkdownFromJSONTyped } from './LinkPreviewGithubMarkdown';
import { LinkPreviewGithubPullRequestFromJSONTyped } from './LinkPreviewGithubPullRequest';
import { LinkPreviewGoogleDocsFromJSONTyped } from './LinkPreviewGoogleDocs';
import { LinkPreviewMdnDocsFromJSONTyped } from './LinkPreviewMdnDocs';
import { LinkPreviewMozillaBugFromJSONTyped } from './LinkPreviewMozillaBug';
import { LinkPreviewSpecsFromJSONTyped } from './LinkPreviewSpecs';
import { LinkPreviewWebkitBugFromJSONTyped } from './LinkPreviewWebkitBug';
/**
*
* @export
@ -59,14 +56,12 @@ export interface LinkPreview {
/**
* Check if a given object implements the LinkPreview interface.
*/
export function instanceOfLinkPreview(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreview(value: object): value is LinkPreview {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewFromJSON(json: any): LinkPreview {
@ -74,7 +69,7 @@ export function LinkPreviewFromJSON(json: any): LinkPreview {
}
export function LinkPreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreview {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
if (!ignoreDiscriminator) {
@ -113,18 +108,15 @@ export function LinkPreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean
}
export function LinkPreviewToJSON(value?: LinkPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': value.information,
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': value['information'],
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -48,14 +48,12 @@ export interface LinkPreviewBase {
/**
* Check if a given object implements the LinkPreviewBase interface.
*/
export function instanceOfLinkPreviewBase(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewBase(value: object): value is LinkPreviewBase {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewBaseFromJSON(json: any): LinkPreviewBase {
@ -63,7 +61,7 @@ export function LinkPreviewBaseFromJSON(json: any): LinkPreviewBase {
}
export function LinkPreviewBaseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewBase {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -76,18 +74,15 @@ export function LinkPreviewBaseFromJSONTyped(json: any, ignoreDiscriminator: boo
}
export function LinkPreviewBaseToJSON(value?: LinkPreviewBase | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': value.information,
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': value['information'],
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewGithubIssueAllOfInformation } from './LinkPreviewGithubIssueAllOfInformation';
import {
LinkPreviewGithubIssueAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewGithubIssue {
/**
* Check if a given object implements the LinkPreviewGithubIssue interface.
*/
export function instanceOfLinkPreviewGithubIssue(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewGithubIssue(value: object): value is LinkPreviewGithubIssue {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewGithubIssueFromJSON(json: any): LinkPreviewGithubIssue {
@ -70,7 +68,7 @@ export function LinkPreviewGithubIssueFromJSON(json: any): LinkPreviewGithubIssu
}
export function LinkPreviewGithubIssueFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubIssue {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewGithubIssueFromJSONTyped(json: any, ignoreDiscriminat
}
export function LinkPreviewGithubIssueToJSON(value?: LinkPreviewGithubIssue | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewGithubIssueAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewGithubIssueAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -111,10 +111,8 @@ export type LinkPreviewGithubIssueAllOfInformationStateReasonEnum = typeof LinkP
/**
* Check if a given object implements the LinkPreviewGithubIssueAllOfInformation interface.
*/
export function instanceOfLinkPreviewGithubIssueAllOfInformation(value: object): boolean {
let isInstance = true;
return isInstance;
export function instanceOfLinkPreviewGithubIssueAllOfInformation(value: object): value is LinkPreviewGithubIssueAllOfInformation {
return true;
}
export function LinkPreviewGithubIssueAllOfInformationFromJSON(json: any): LinkPreviewGithubIssueAllOfInformation {
@ -122,45 +120,42 @@ export function LinkPreviewGithubIssueAllOfInformationFromJSON(json: any): LinkP
}
export function LinkPreviewGithubIssueAllOfInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubIssueAllOfInformation {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'url': !exists(json, 'url') ? undefined : json['url'],
'number': !exists(json, 'number') ? undefined : json['number'],
'title': !exists(json, 'title') ? undefined : json['title'],
'user_login': !exists(json, 'user_login') ? undefined : json['user_login'],
'state': !exists(json, 'state') ? undefined : json['state'],
'state_reason': !exists(json, 'state_reason') ? undefined : json['state_reason'],
'assignee_login': !exists(json, 'assignee_login') ? undefined : json['assignee_login'],
'created_at': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
'updated_at': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])),
'closed_at': !exists(json, 'closed_at') ? undefined : (new Date(json['closed_at'])),
'labels': !exists(json, 'labels') ? undefined : json['labels'],
'url': json['url'] == null ? undefined : json['url'],
'number': json['number'] == null ? undefined : json['number'],
'title': json['title'] == null ? undefined : json['title'],
'user_login': json['user_login'] == null ? undefined : json['user_login'],
'state': json['state'] == null ? undefined : json['state'],
'state_reason': json['state_reason'] == null ? undefined : json['state_reason'],
'assignee_login': json['assignee_login'] == null ? undefined : json['assignee_login'],
'created_at': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
'updated_at': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
'closed_at': json['closed_at'] == null ? undefined : (new Date(json['closed_at'])),
'labels': json['labels'] == null ? undefined : json['labels'],
};
}
export function LinkPreviewGithubIssueAllOfInformationToJSON(value?: LinkPreviewGithubIssueAllOfInformation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'number': value.number,
'title': value.title,
'user_login': value.user_login,
'state': value.state,
'state_reason': value.state_reason,
'assignee_login': value.assignee_login,
'created_at': value.created_at === undefined ? undefined : (value.created_at.toISOString().substring(0,10)),
'updated_at': value.updated_at === undefined ? undefined : (value.updated_at.toISOString().substring(0,10)),
'closed_at': value.closed_at === undefined ? undefined : (value.closed_at.toISOString().substring(0,10)),
'labels': value.labels,
'url': value['url'],
'number': value['number'],
'title': value['title'],
'user_login': value['user_login'],
'state': value['state'],
'state_reason': value['state_reason'],
'assignee_login': value['assignee_login'],
'created_at': value['created_at'] == null ? undefined : ((value['created_at']).toISOString().substring(0,10)),
'updated_at': value['updated_at'] == null ? undefined : ((value['updated_at']).toISOString().substring(0,10)),
'closed_at': value['closed_at'] == null ? undefined : ((value['closed_at']).toISOString().substring(0,10)),
'labels': value['labels'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewGithubMarkdownAllOfInformation } from './LinkPreviewGithubMarkdownAllOfInformation';
import {
LinkPreviewGithubMarkdownAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewGithubMarkdown {
/**
* Check if a given object implements the LinkPreviewGithubMarkdown interface.
*/
export function instanceOfLinkPreviewGithubMarkdown(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewGithubMarkdown(value: object): value is LinkPreviewGithubMarkdown {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewGithubMarkdownFromJSON(json: any): LinkPreviewGithubMarkdown {
@ -70,7 +68,7 @@ export function LinkPreviewGithubMarkdownFromJSON(json: any): LinkPreviewGithubM
}
export function LinkPreviewGithubMarkdownFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubMarkdown {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewGithubMarkdownFromJSONTyped(json: any, ignoreDiscrimi
}
export function LinkPreviewGithubMarkdownToJSON(value?: LinkPreviewGithubMarkdown | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewGithubMarkdownAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewGithubMarkdownAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -36,10 +36,8 @@ export interface LinkPreviewGithubMarkdownAllOfInformation {
/**
* Check if a given object implements the LinkPreviewGithubMarkdownAllOfInformation interface.
*/
export function instanceOfLinkPreviewGithubMarkdownAllOfInformation(value: object): boolean {
let isInstance = true;
return isInstance;
export function instanceOfLinkPreviewGithubMarkdownAllOfInformation(value: object): value is LinkPreviewGithubMarkdownAllOfInformation {
return true;
}
export function LinkPreviewGithubMarkdownAllOfInformationFromJSON(json: any): LinkPreviewGithubMarkdownAllOfInformation {
@ -47,27 +45,24 @@ export function LinkPreviewGithubMarkdownAllOfInformationFromJSON(json: any): Li
}
export function LinkPreviewGithubMarkdownAllOfInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubMarkdownAllOfInformation {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'_parsed_title': !exists(json, '_parsed_title') ? undefined : json['_parsed_title'],
'content': !exists(json, 'content') ? undefined : json['content'],
'_parsed_title': json['_parsed_title'] == null ? undefined : json['_parsed_title'],
'content': json['content'] == null ? undefined : json['content'],
};
}
export function LinkPreviewGithubMarkdownAllOfInformationToJSON(value?: LinkPreviewGithubMarkdownAllOfInformation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'_parsed_title': value._parsed_title,
'content': value.content,
'_parsed_title': value['_parsed_title'],
'content': value['content'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewGithubIssueAllOfInformation } from './LinkPreviewGithubIssueAllOfInformation';
import {
LinkPreviewGithubIssueAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewGithubPullRequest {
/**
* Check if a given object implements the LinkPreviewGithubPullRequest interface.
*/
export function instanceOfLinkPreviewGithubPullRequest(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewGithubPullRequest(value: object): value is LinkPreviewGithubPullRequest {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewGithubPullRequestFromJSON(json: any): LinkPreviewGithubPullRequest {
@ -70,7 +68,7 @@ export function LinkPreviewGithubPullRequestFromJSON(json: any): LinkPreviewGith
}
export function LinkPreviewGithubPullRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGithubPullRequest {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewGithubPullRequestFromJSONTyped(json: any, ignoreDiscr
}
export function LinkPreviewGithubPullRequestToJSON(value?: LinkPreviewGithubPullRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewGithubIssueAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewGithubIssueAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
import {
LinkPreviewOpenGraphAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewGoogleDocs {
/**
* Check if a given object implements the LinkPreviewGoogleDocs interface.
*/
export function instanceOfLinkPreviewGoogleDocs(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewGoogleDocs(value: object): value is LinkPreviewGoogleDocs {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewGoogleDocsFromJSON(json: any): LinkPreviewGoogleDocs {
@ -70,7 +68,7 @@ export function LinkPreviewGoogleDocsFromJSON(json: any): LinkPreviewGoogleDocs
}
export function LinkPreviewGoogleDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewGoogleDocs {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewGoogleDocsFromJSONTyped(json: any, ignoreDiscriminato
}
export function LinkPreviewGoogleDocsToJSON(value?: LinkPreviewGoogleDocs | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
import {
LinkPreviewOpenGraphAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewMdnDocs {
/**
* Check if a given object implements the LinkPreviewMdnDocs interface.
*/
export function instanceOfLinkPreviewMdnDocs(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewMdnDocs(value: object): value is LinkPreviewMdnDocs {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewMdnDocsFromJSON(json: any): LinkPreviewMdnDocs {
@ -70,7 +68,7 @@ export function LinkPreviewMdnDocsFromJSON(json: any): LinkPreviewMdnDocs {
}
export function LinkPreviewMdnDocsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewMdnDocs {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewMdnDocsFromJSONTyped(json: any, ignoreDiscriminator:
}
export function LinkPreviewMdnDocsToJSON(value?: LinkPreviewMdnDocs | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
import {
LinkPreviewOpenGraphAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewMozillaBug {
/**
* Check if a given object implements the LinkPreviewMozillaBug interface.
*/
export function instanceOfLinkPreviewMozillaBug(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewMozillaBug(value: object): value is LinkPreviewMozillaBug {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewMozillaBugFromJSON(json: any): LinkPreviewMozillaBug {
@ -70,7 +68,7 @@ export function LinkPreviewMozillaBugFromJSON(json: any): LinkPreviewMozillaBug
}
export function LinkPreviewMozillaBugFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewMozillaBug {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewMozillaBugFromJSONTyped(json: any, ignoreDiscriminato
}
export function LinkPreviewMozillaBugToJSON(value?: LinkPreviewMozillaBug | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
import {
LinkPreviewOpenGraphAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewOpenGraph {
/**
* Check if a given object implements the LinkPreviewOpenGraph interface.
*/
export function instanceOfLinkPreviewOpenGraph(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewOpenGraph(value: object): value is LinkPreviewOpenGraph {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewOpenGraphFromJSON(json: any): LinkPreviewOpenGraph {
@ -70,7 +68,7 @@ export function LinkPreviewOpenGraphFromJSON(json: any): LinkPreviewOpenGraph {
}
export function LinkPreviewOpenGraphFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewOpenGraph {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewOpenGraphFromJSONTyped(json: any, ignoreDiscriminator
}
export function LinkPreviewOpenGraphToJSON(value?: LinkPreviewOpenGraph | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -36,10 +36,8 @@ export interface LinkPreviewOpenGraphAllOfInformation {
/**
* Check if a given object implements the LinkPreviewOpenGraphAllOfInformation interface.
*/
export function instanceOfLinkPreviewOpenGraphAllOfInformation(value: object): boolean {
let isInstance = true;
return isInstance;
export function instanceOfLinkPreviewOpenGraphAllOfInformation(value: object): value is LinkPreviewOpenGraphAllOfInformation {
return true;
}
export function LinkPreviewOpenGraphAllOfInformationFromJSON(json: any): LinkPreviewOpenGraphAllOfInformation {
@ -47,27 +45,24 @@ export function LinkPreviewOpenGraphAllOfInformationFromJSON(json: any): LinkPre
}
export function LinkPreviewOpenGraphAllOfInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewOpenGraphAllOfInformation {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'title': !exists(json, 'title') ? undefined : json['title'],
'description': !exists(json, 'description') ? undefined : json['description'],
'title': json['title'] == null ? undefined : json['title'],
'description': json['description'] == null ? undefined : json['description'],
};
}
export function LinkPreviewOpenGraphAllOfInformationToJSON(value?: LinkPreviewOpenGraphAllOfInformation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'title': value.title,
'description': value.description,
'title': value['title'],
'description': value['description'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
import {
LinkPreviewOpenGraphAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewSpecs {
/**
* Check if a given object implements the LinkPreviewSpecs interface.
*/
export function instanceOfLinkPreviewSpecs(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewSpecs(value: object): value is LinkPreviewSpecs {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewSpecsFromJSON(json: any): LinkPreviewSpecs {
@ -70,7 +68,7 @@ export function LinkPreviewSpecsFromJSON(json: any): LinkPreviewSpecs {
}
export function LinkPreviewSpecsFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewSpecs {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewSpecsFromJSONTyped(json: any, ignoreDiscriminator: bo
}
export function LinkPreviewSpecsToJSON(value?: LinkPreviewSpecs | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { LinkPreviewOpenGraphAllOfInformation } from './LinkPreviewOpenGraphAllOfInformation';
import {
LinkPreviewOpenGraphAllOfInformationFromJSON,
@ -55,14 +55,12 @@ export interface LinkPreviewWebkitBug {
/**
* Check if a given object implements the LinkPreviewWebkitBug interface.
*/
export function instanceOfLinkPreviewWebkitBug(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "url" in value;
isInstance = isInstance && "type" in value;
isInstance = isInstance && "information" in value;
isInstance = isInstance && "http_error_code" in value;
return isInstance;
export function instanceOfLinkPreviewWebkitBug(value: object): value is LinkPreviewWebkitBug {
if (!('url' in value) || value['url'] === undefined) return false;
if (!('type' in value) || value['type'] === undefined) return false;
if (!('information' in value) || value['information'] === undefined) return false;
if (!('http_error_code' in value) || value['http_error_code'] === undefined) return false;
return true;
}
export function LinkPreviewWebkitBugFromJSON(json: any): LinkPreviewWebkitBug {
@ -70,7 +68,7 @@ export function LinkPreviewWebkitBugFromJSON(json: any): LinkPreviewWebkitBug {
}
export function LinkPreviewWebkitBugFromJSONTyped(json: any, ignoreDiscriminator: boolean): LinkPreviewWebkitBug {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -83,18 +81,15 @@ export function LinkPreviewWebkitBugFromJSONTyped(json: any, ignoreDiscriminator
}
export function LinkPreviewWebkitBugToJSON(value?: LinkPreviewWebkitBug | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'url': value.url,
'type': value.type,
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value.information),
'http_error_code': value.http_error_code,
'url': value['url'],
'type': value['type'],
'information': LinkPreviewOpenGraphAllOfInformationToJSON(value['information']),
'http_error_code': value['http_error_code'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { FeatureLink } from './FeatureLink';
import {
FeatureLinkFromJSON,
@ -85,13 +85,11 @@ export type OutstandingReviewCurrentStageEnum = typeof OutstandingReviewCurrentS
/**
* Check if a given object implements the OutstandingReview interface.
*/
export function instanceOfOutstandingReview(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "review_link" in value;
isInstance = isInstance && "feature" in value;
isInstance = isInstance && "current_stage" in value;
return isInstance;
export function instanceOfOutstandingReview(value: object): value is OutstandingReview {
if (!('review_link' in value) || value['review_link'] === undefined) return false;
if (!('feature' in value) || value['feature'] === undefined) return false;
if (!('current_stage' in value) || value['current_stage'] === undefined) return false;
return true;
}
export function OutstandingReviewFromJSON(json: any): OutstandingReview {
@ -99,7 +97,7 @@ export function OutstandingReviewFromJSON(json: any): OutstandingReview {
}
export function OutstandingReviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutstandingReview {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -107,25 +105,22 @@ export function OutstandingReviewFromJSONTyped(json: any, ignoreDiscriminator: b
'review_link': json['review_link'],
'feature': FeatureLinkFromJSON(json['feature']),
'current_stage': json['current_stage'],
'estimated_start_milestone': !exists(json, 'estimated_start_milestone') ? undefined : json['estimated_start_milestone'],
'estimated_end_milestone': !exists(json, 'estimated_end_milestone') ? undefined : json['estimated_end_milestone'],
'estimated_start_milestone': json['estimated_start_milestone'] == null ? undefined : json['estimated_start_milestone'],
'estimated_end_milestone': json['estimated_end_milestone'] == null ? undefined : json['estimated_end_milestone'],
};
}
export function OutstandingReviewToJSON(value?: OutstandingReview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'review_link': value.review_link,
'feature': FeatureLinkToJSON(value.feature),
'current_stage': value.current_stage,
'estimated_start_milestone': value.estimated_start_milestone,
'estimated_end_milestone': value.estimated_end_milestone,
'review_link': value['review_link'],
'feature': FeatureLinkToJSON(value['feature']),
'current_stage': value['current_stage'],
'estimated_start_milestone': value['estimated_start_milestone'],
'estimated_end_milestone': value['estimated_end_milestone'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@ -48,12 +48,10 @@ export interface OwnersAndSubscribersOfComponent {
/**
* Check if a given object implements the OwnersAndSubscribersOfComponent interface.
*/
export function instanceOfOwnersAndSubscribersOfComponent(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
return isInstance;
export function instanceOfOwnersAndSubscribersOfComponent(value: object): value is OwnersAndSubscribersOfComponent {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
return true;
}
export function OwnersAndSubscribersOfComponentFromJSON(json: any): OwnersAndSubscribersOfComponent {
@ -61,31 +59,28 @@ export function OwnersAndSubscribersOfComponentFromJSON(json: any): OwnersAndSub
}
export function OwnersAndSubscribersOfComponentFromJSONTyped(json: any, ignoreDiscriminator: boolean): OwnersAndSubscribersOfComponent {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'subscriber_ids': !exists(json, 'subscriber_ids') ? undefined : json['subscriber_ids'],
'owner_ids': !exists(json, 'owner_ids') ? undefined : json['owner_ids'],
'subscriber_ids': json['subscriber_ids'] == null ? undefined : json['subscriber_ids'],
'owner_ids': json['owner_ids'] == null ? undefined : json['owner_ids'],
};
}
export function OwnersAndSubscribersOfComponentToJSON(value?: OwnersAndSubscribersOfComponent | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'id': value.id,
'name': value.name,
'subscriber_ids': value.subscriber_ids,
'owner_ids': value.owner_ids,
'id': value['id'],
'name': value['name'],
'subscriber_ids': value['subscriber_ids'],
'owner_ids': value['owner_ids'],
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { FeatureLink } from './FeatureLink';
import {
FeatureLinkFromJSON,
@ -49,12 +49,10 @@ export interface ReviewLatency {
/**
* Check if a given object implements the ReviewLatency interface.
*/
export function instanceOfReviewLatency(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "feature" in value;
isInstance = isInstance && "gate_reviews" in value;
return isInstance;
export function instanceOfReviewLatency(value: object): value is ReviewLatency {
if (!('feature' in value) || value['feature'] === undefined) return false;
if (!('gate_reviews' in value) || value['gate_reviews'] === undefined) return false;
return true;
}
export function ReviewLatencyFromJSON(json: any): ReviewLatency {
@ -62,7 +60,7 @@ export function ReviewLatencyFromJSON(json: any): ReviewLatency {
}
export function ReviewLatencyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReviewLatency {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -73,16 +71,13 @@ export function ReviewLatencyFromJSONTyped(json: any, ignoreDiscriminator: boole
}
export function ReviewLatencyToJSON(value?: ReviewLatency | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'feature': FeatureLinkToJSON(value.feature),
'gate_reviews': ((value.gate_reviews as Array<any>).map(GateLatencyToJSON)),
'feature': FeatureLinkToJSON(value['feature']),
'gate_reviews': ((value['gate_reviews'] as Array<any>).map(GateLatencyToJSON)),
};
}

Просмотреть файл

@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
import type { FeatureLink } from './FeatureLink';
import {
FeatureLinkFromJSON,
@ -43,12 +43,10 @@ export interface SpecMentor {
/**
* Check if a given object implements the SpecMentor interface.
*/
export function instanceOfSpecMentor(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "email" in value;
isInstance = isInstance && "mentored_features" in value;
return isInstance;
export function instanceOfSpecMentor(value: object): value is SpecMentor {
if (!('email' in value) || value['email'] === undefined) return false;
if (!('mentored_features' in value) || value['mentored_features'] === undefined) return false;
return true;
}
export function SpecMentorFromJSON(json: any): SpecMentor {
@ -56,7 +54,7 @@ export function SpecMentorFromJSON(json: any): SpecMentor {
}
export function SpecMentorFromJSONTyped(json: any, ignoreDiscriminator: boolean): SpecMentor {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
@ -67,16 +65,13 @@ export function SpecMentorFromJSONTyped(json: any, ignoreDiscriminator: boolean)
}
export function SpecMentorToJSON(value?: SpecMentor | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'email': value.email,
'mentored_features': ((value.mentored_features as Array<any>).map(FeatureLinkToJSON)),
'email': value['email'],
'mentored_features': ((value['mentored_features'] as Array<any>).map(FeatureLinkToJSON)),
};
}

Просмотреть файл

@ -22,7 +22,7 @@ export interface ConfigurationParameters {
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
@ -59,7 +59,7 @@ export class Configuration {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;
@ -310,11 +310,6 @@ export interface RequestOpts {
body?: HTTPBody;
}
export function exists(json: any, key: string) {
const value = json[key];
return value !== null && value !== undefined;
}
export function querystring(params: HTTPQuery, prefix: string = ''): string {
return Object.keys(params)
.map(key => querystringSingleKey(key, params[key], prefix))

Просмотреть файл

@ -1 +1 @@
7.2.0
7.6.0

Просмотреть файл

@ -431,8 +431,14 @@ components:
ExternalReviewsResponse:
example:
link_previews:
- null
- null
- information: "{}"
type: type
http_error_code: 1
url: http://example.com/aeiou
- information: "{}"
type: type
http_error_code: 1
url: http://example.com/aeiou
reviews:
- feature:
name: WebGPU
@ -566,6 +572,11 @@ components:
webkit_bug: LinkPreviewWebkitBug
specs: LinkPreviewSpecs
propertyName: type
example:
information: "{}"
type: type
http_error_code: 1
url: http://example.com/aeiou
title: LinkPreview
LinkPreviewGithubIssue:
allOf:

Просмотреть файл

@ -1,6 +1,8 @@
connexion[swagger-ui] >= 2.6.0; python_version>="3.6"
# 2.3 is the last version that supports python 3.4-3.5
connexion[swagger-ui] <= 2.3.0; python_version=="3.5" or python_version=="3.4"
# prevent breaking dependencies from advent of connexion>=3.0
connexion[swagger-ui] <= 2.14.2; python_version>"3.4"
# connexion requires werkzeug but connexion < 2.4.0 does not install werkzeug
# we must peg werkzeug versions below to fix connexion
# https://github.com/zalando/connexion/pull/1044

Просмотреть файл

@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.2.0"
"version": "7.6.0"
}
}