Make certain props in feature links nullable (#4281)

* make certain props in feature links nullable

* update openapi models

* update TS type def for FeatureLink

* remove information and http_error_code required

* Use LinkPreview instead of LinkPreviewBase

* information set to optional
This commit is contained in:
Daniel Smith 2024-08-25 11:30:07 -07:00 коммит произвёл GitHub
Родитель e8f4661d7a
Коммит d02bcaa64f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
30 изменённых файлов: 76 добавлений и 162 удалений

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

@ -18,8 +18,8 @@
* @typedef {object} FeatureLink
* @property {string} url
* @property {string} type
* @property {object} information - fields depend on type; see link_helpers.py
* @property {number} http_error_code
* @property {object} [information] - fields depend on type; see link_helpers.py
* @property {number | null} [http_error_code]
*/
/**

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

@ -13,12 +13,12 @@
*/
import { mapValues } from '../runtime';
import type { LinkPreviewBase } from './LinkPreviewBase';
import type { LinkPreview } from './LinkPreview';
import {
LinkPreviewBaseFromJSON,
LinkPreviewBaseFromJSONTyped,
LinkPreviewBaseToJSON,
} from './LinkPreviewBase';
LinkPreviewFromJSON,
LinkPreviewFromJSONTyped,
LinkPreviewToJSON,
} from './LinkPreview';
/**
*
@ -28,10 +28,10 @@ import {
export interface FeatureLinksResponse {
/**
*
* @type {Array<LinkPreviewBase>}
* @type {Array<LinkPreview>}
* @memberof FeatureLinksResponse
*/
data?: Array<LinkPreviewBase>;
data?: Array<LinkPreview>;
/**
*
* @type {boolean}
@ -57,7 +57,7 @@ export function FeatureLinksResponseFromJSONTyped(json: any, ignoreDiscriminator
}
return {
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(LinkPreviewBaseFromJSON)),
'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(LinkPreviewFromJSON)),
'has_stale_links': json['has_stale_links'] == null ? undefined : json['has_stale_links'],
};
}
@ -68,7 +68,7 @@ export function FeatureLinksResponseToJSON(value?: FeatureLinksResponse | null):
}
return {
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(LinkPreviewBaseToJSON)),
'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(LinkPreviewToJSON)),
'has_stale_links': value['has_stale_links'],
};
}

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

@ -36,13 +36,13 @@ export interface FeatureLinksSample {
* @type {object}
* @memberof FeatureLinksSample
*/
information: object;
information?: object;
/**
*
* @type {number}
* @memberof FeatureLinksSample
*/
http_error_code: number;
http_error_code?: number;
/**
*
* @type {Array<number>}
@ -57,8 +57,6 @@ export interface FeatureLinksSample {
export function instanceOfFeatureLinksSample(value: object): value is FeatureLinksSample {
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;
}
@ -74,8 +72,8 @@ export function FeatureLinksSampleFromJSONTyped(json: any, ignoreDiscriminator:
'url': json['url'],
'type': json['type'],
'information': json['information'],
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : json['information'],
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
'feature_ids': json['feature_ids'] == null ? undefined : json['feature_ids'],
};
}

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

@ -44,13 +44,13 @@ export interface LinkPreview {
* @type {object}
* @memberof LinkPreview
*/
information: object;
information?: object;
/**
*
* @type {number}
* @memberof LinkPreview
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -59,8 +59,6 @@ export interface LinkPreview {
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;
}
@ -102,8 +100,8 @@ export function LinkPreviewFromJSONTyped(json: any, ignoreDiscriminator: boolean
'url': json['url'],
'type': json['type'],
'information': json['information'],
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : json['information'],
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -36,13 +36,13 @@ export interface LinkPreviewBase {
* @type {object}
* @memberof LinkPreviewBase
*/
information: object;
information?: object;
/**
*
* @type {number}
* @memberof LinkPreviewBase
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -51,8 +51,6 @@ export interface LinkPreviewBase {
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;
}
@ -68,8 +66,8 @@ export function LinkPreviewBaseFromJSONTyped(json: any, ignoreDiscriminator: boo
'url': json['url'],
'type': json['type'],
'information': json['information'],
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : json['information'],
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewGithubIssue {
* @type {LinkPreviewGithubIssueAllOfInformation}
* @memberof LinkPreviewGithubIssue
*/
information: LinkPreviewGithubIssueAllOfInformation;
information?: LinkPreviewGithubIssueAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewGithubIssue
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewGithubIssue {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewGithubIssueFromJSONTyped(json: any, ignoreDiscriminat
'url': json['url'],
'type': json['type'],
'information': LinkPreviewGithubIssueAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewGithubIssueAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewGithubMarkdown {
* @type {LinkPreviewGithubMarkdownAllOfInformation}
* @memberof LinkPreviewGithubMarkdown
*/
information: LinkPreviewGithubMarkdownAllOfInformation;
information?: LinkPreviewGithubMarkdownAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewGithubMarkdown
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewGithubMarkdown {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewGithubMarkdownFromJSONTyped(json: any, ignoreDiscrimi
'url': json['url'],
'type': json['type'],
'information': LinkPreviewGithubMarkdownAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewGithubMarkdownAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewGithubPullRequest {
* @type {LinkPreviewGithubIssueAllOfInformation}
* @memberof LinkPreviewGithubPullRequest
*/
information: LinkPreviewGithubIssueAllOfInformation;
information?: LinkPreviewGithubIssueAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewGithubPullRequest
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewGithubPullRequest {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewGithubPullRequestFromJSONTyped(json: any, ignoreDiscr
'url': json['url'],
'type': json['type'],
'information': LinkPreviewGithubIssueAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewGithubIssueAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewGoogleDocs {
* @type {LinkPreviewOpenGraphAllOfInformation}
* @memberof LinkPreviewGoogleDocs
*/
information: LinkPreviewOpenGraphAllOfInformation;
information?: LinkPreviewOpenGraphAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewGoogleDocs
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewGoogleDocs {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewGoogleDocsFromJSONTyped(json: any, ignoreDiscriminato
'url': json['url'],
'type': json['type'],
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewMdnDocs {
* @type {LinkPreviewOpenGraphAllOfInformation}
* @memberof LinkPreviewMdnDocs
*/
information: LinkPreviewOpenGraphAllOfInformation;
information?: LinkPreviewOpenGraphAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewMdnDocs
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewMdnDocs {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewMdnDocsFromJSONTyped(json: any, ignoreDiscriminator:
'url': json['url'],
'type': json['type'],
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewMozillaBug {
* @type {LinkPreviewOpenGraphAllOfInformation}
* @memberof LinkPreviewMozillaBug
*/
information: LinkPreviewOpenGraphAllOfInformation;
information?: LinkPreviewOpenGraphAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewMozillaBug
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewMozillaBug {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewMozillaBugFromJSONTyped(json: any, ignoreDiscriminato
'url': json['url'],
'type': json['type'],
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewOpenGraph {
* @type {LinkPreviewOpenGraphAllOfInformation}
* @memberof LinkPreviewOpenGraph
*/
information: LinkPreviewOpenGraphAllOfInformation;
information?: LinkPreviewOpenGraphAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewOpenGraph
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewOpenGraph {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewOpenGraphFromJSONTyped(json: any, ignoreDiscriminator
'url': json['url'],
'type': json['type'],
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewSpecs {
* @type {LinkPreviewOpenGraphAllOfInformation}
* @memberof LinkPreviewSpecs
*/
information: LinkPreviewOpenGraphAllOfInformation;
information?: LinkPreviewOpenGraphAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewSpecs
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewSpecs {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewSpecsFromJSONTyped(json: any, ignoreDiscriminator: bo
'url': json['url'],
'type': json['type'],
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -43,13 +43,13 @@ export interface LinkPreviewWebkitBug {
* @type {LinkPreviewOpenGraphAllOfInformation}
* @memberof LinkPreviewWebkitBug
*/
information: LinkPreviewOpenGraphAllOfInformation;
information?: LinkPreviewOpenGraphAllOfInformation;
/**
*
* @type {number}
* @memberof LinkPreviewWebkitBug
*/
http_error_code: number;
http_error_code?: number;
}
/**
@ -58,8 +58,6 @@ export interface LinkPreviewWebkitBug {
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;
}
@ -75,8 +73,8 @@ export function LinkPreviewWebkitBugFromJSONTyped(json: any, ignoreDiscriminator
'url': json['url'],
'type': json['type'],
'information': LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'],
'information': json['information'] == null ? undefined : LinkPreviewOpenGraphAllOfInformationFromJSON(json['information']),
'http_error_code': json['http_error_code'] == null ? undefined : json['http_error_code'],
};
}

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

@ -3,10 +3,10 @@ from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from chromestatus_openapi.models.base_model import Model
from chromestatus_openapi.models.link_preview_base import LinkPreviewBase
from chromestatus_openapi.models.link_preview import LinkPreview
from chromestatus_openapi import util
from chromestatus_openapi.models.link_preview_base import LinkPreviewBase # noqa: E501
from chromestatus_openapi.models.link_preview import LinkPreview # noqa: E501
class FeatureLinksResponse(Model):
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -18,12 +18,12 @@ class FeatureLinksResponse(Model):
"""FeatureLinksResponse - a model defined in OpenAPI
:param data: The data of this FeatureLinksResponse. # noqa: E501
:type data: List[LinkPreviewBase]
:type data: List[LinkPreview]
:param has_stale_links: The has_stale_links of this FeatureLinksResponse. # noqa: E501
:type has_stale_links: bool
"""
self.openapi_types = {
'data': List[LinkPreviewBase],
'data': List[LinkPreview],
'has_stale_links': bool
}
@ -47,22 +47,22 @@ class FeatureLinksResponse(Model):
return util.deserialize_model(dikt, cls)
@property
def data(self) -> List[LinkPreviewBase]:
def data(self) -> List[LinkPreview]:
"""Gets the data of this FeatureLinksResponse.
:return: The data of this FeatureLinksResponse.
:rtype: List[LinkPreviewBase]
:rtype: List[LinkPreview]
"""
return self._data
@data.setter
def data(self, data: List[LinkPreviewBase]):
def data(self, data: List[LinkPreview]):
"""Sets the data of this FeatureLinksResponse.
:param data: The data of this FeatureLinksResponse.
:type data: List[LinkPreviewBase]
:type data: List[LinkPreview]
"""
self._data = data

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

@ -123,8 +123,6 @@ class FeatureLinksSample(Model):
:param information: The information of this FeatureLinksSample.
:type information: object
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -146,8 +144,6 @@ class FeatureLinksSample(Model):
:param http_error_code: The http_error_code of this FeatureLinksSample.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -118,8 +118,6 @@ class LinkPreview(Model):
:param information: The information of this LinkPreview.
:type information: object
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -141,7 +139,5 @@ class LinkPreview(Model):
:param http_error_code: The http_error_code of this LinkPreview.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -118,8 +118,6 @@ class LinkPreviewBase(Model):
:param information: The information of this LinkPreviewBase.
:type information: object
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -141,7 +139,5 @@ class LinkPreviewBase(Model):
:param http_error_code: The http_error_code of this LinkPreviewBase.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewGithubIssue(Model):
:param information: The information of this LinkPreviewGithubIssue.
:type information: LinkPreviewGithubIssueAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewGithubIssue(Model):
:param http_error_code: The http_error_code of this LinkPreviewGithubIssue.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewGithubMarkdown(Model):
:param information: The information of this LinkPreviewGithubMarkdown.
:type information: LinkPreviewGithubMarkdownAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewGithubMarkdown(Model):
:param http_error_code: The http_error_code of this LinkPreviewGithubMarkdown.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewGithubPullRequest(Model):
:param information: The information of this LinkPreviewGithubPullRequest.
:type information: LinkPreviewGithubIssueAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewGithubPullRequest(Model):
:param http_error_code: The http_error_code of this LinkPreviewGithubPullRequest.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewGoogleDocs(Model):
:param information: The information of this LinkPreviewGoogleDocs.
:type information: LinkPreviewOpenGraphAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewGoogleDocs(Model):
:param http_error_code: The http_error_code of this LinkPreviewGoogleDocs.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewMdnDocs(Model):
:param information: The information of this LinkPreviewMdnDocs.
:type information: LinkPreviewOpenGraphAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewMdnDocs(Model):
:param http_error_code: The http_error_code of this LinkPreviewMdnDocs.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewMozillaBug(Model):
:param information: The information of this LinkPreviewMozillaBug.
:type information: LinkPreviewOpenGraphAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewMozillaBug(Model):
:param http_error_code: The http_error_code of this LinkPreviewMozillaBug.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewOpenGraph(Model):
:param information: The information of this LinkPreviewOpenGraph.
:type information: LinkPreviewOpenGraphAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewOpenGraph(Model):
:param http_error_code: The http_error_code of this LinkPreviewOpenGraph.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewSpecs(Model):
:param information: The information of this LinkPreviewSpecs.
:type information: LinkPreviewOpenGraphAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewSpecs(Model):
:param http_error_code: The http_error_code of this LinkPreviewSpecs.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -120,8 +120,6 @@ class LinkPreviewWebkitBug(Model):
:param information: The information of this LinkPreviewWebkitBug.
:type information: LinkPreviewOpenGraphAllOfInformation
"""
if information is None:
raise ValueError("Invalid value for `information`, must not be `None`") # noqa: E501
self._information = information
@ -143,7 +141,5 @@ class LinkPreviewWebkitBug(Model):
:param http_error_code: The http_error_code of this LinkPreviewWebkitBug.
:type http_error_code: int
"""
if http_error_code is None:
raise ValueError("Invalid value for `http_error_code`, must not be `None`") # noqa: E501
self._http_error_code = http_error_code

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

@ -1960,11 +1960,6 @@ components:
title: FeatureLink
type: object
LinkPreviewBase:
example:
information: "{}"
type: type
http_error_code: 0
url: http://example.com/aeiou
properties:
url:
format: url
@ -1974,14 +1969,14 @@ components:
title: type
type: string
information:
nullable: true
title: information
type: object
http_error_code:
nullable: true
title: http_error_code
type: integer
required:
- http_error_code
- information
- type
- url
title: LinkPreviewBase
@ -2012,8 +2007,6 @@ components:
- properties:
information:
$ref: '#/components/schemas/LinkPreviewGithubIssue_allOf_information'
required:
- information
type: object
title: LinkPreviewGithubIssue
LinkPreviewGithubPullRequest:
@ -2025,8 +2018,6 @@ components:
- properties:
information:
$ref: '#/components/schemas/LinkPreviewGithubMarkdown_allOf_information'
required:
- information
type: object
LinkPreviewOpenGraph:
allOf:
@ -2034,8 +2025,6 @@ components:
- properties:
information:
$ref: '#/components/schemas/LinkPreviewOpenGraph_allOf_information'
required:
- information
type: object
title: LinkPreviewOpenGraph
LinkPreviewMdnDocs:
@ -2058,17 +2047,17 @@ components:
data:
- information: "{}"
type: type
http_error_code: 0
http_error_code: 1
url: http://example.com/aeiou
- information: "{}"
type: type
http_error_code: 0
http_error_code: 1
url: http://example.com/aeiou
has_stale_links: true
properties:
data:
items:
$ref: '#/components/schemas/LinkPreviewBase'
$ref: '#/components/schemas/LinkPreview'
title: data
type: array
has_stale_links:

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

@ -1237,8 +1237,6 @@ components:
required:
- url
- type
- information
- http_error_code
properties:
url:
type: string
@ -1247,8 +1245,10 @@ components:
type: string
information:
type: object
nullable: true
http_error_code:
type: integer
nullable: true
LinkPreview:
allOf:
- $ref: '#/components/schemas/LinkPreviewBase'
@ -1267,7 +1267,6 @@ components:
allOf:
- $ref: '#/components/schemas/LinkPreviewBase'
- type: object
required: [information]
properties:
information:
type: object
@ -1314,7 +1313,6 @@ components:
allOf:
- $ref: '#/components/schemas/LinkPreviewBase'
- type: object
required: [information]
properties:
information:
type: object
@ -1327,7 +1325,6 @@ components:
allOf:
- $ref: '#/components/schemas/LinkPreviewBase'
- type: object
required: [information]
properties:
information:
type: object
@ -1357,7 +1354,7 @@ components:
data:
type: array
items:
$ref: '#/components/schemas/LinkPreviewBase'
$ref: '#/components/schemas/LinkPreview'
has_stale_links:
type: boolean
FeatureLinksSummaryResponse: