mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-30 09:59:45 +03:00
feat(): Expose certain extensions
This commit is contained in:
parent
aa159377d5
commit
efbcec58a0
|
@ -60,6 +60,11 @@ export class FieldModel {
|
||||||
|
|
||||||
serializationMime?: string;
|
serializationMime?: string;
|
||||||
extraDescription: Record<string, boolean>;
|
extraDescription: Record<string, boolean>;
|
||||||
|
extraApiReferenceForValidation: {
|
||||||
|
httpVerb: string;
|
||||||
|
label: string;
|
||||||
|
description: string;
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
parser: OpenAPIParser,
|
parser: OpenAPIParser,
|
||||||
|
@ -104,6 +109,17 @@ export class FieldModel {
|
||||||
this.extraDescription = info[MilesConstants.MILES_EXTRA_DESCRIPTION_PROPERTY_NAME];
|
this.extraDescription = info[MilesConstants.MILES_EXTRA_DESCRIPTION_PROPERTY_NAME];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
info[MilesConstants.MILES_VALIDATION_MODEL_PROPERTY_NAME] !== undefined &&
|
||||||
|
info[MilesConstants.MILES_VALIDATION_MODEL_PROPERTY_NAME]?.label
|
||||||
|
) {
|
||||||
|
this.extraApiReferenceForValidation = {
|
||||||
|
label: info[MilesConstants.MILES_VALIDATION_MODEL_PROPERTY_NAME]?.label,
|
||||||
|
httpVerb: info[MilesConstants.MILES_VALIDATION_MODEL_PROPERTY_NAME]?.httpVerb,
|
||||||
|
description: info[MilesConstants.MILES_VALIDATION_MODEL_PROPERTY_NAME]?.description,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (serializationMime) {
|
if (serializationMime) {
|
||||||
this.serializationMime = serializationMime;
|
this.serializationMime = serializationMime;
|
||||||
} else if (info.style) {
|
} else if (info.style) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user