mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
allow additionalProperties: false (#39167)
From https://swagger.io/specification/#model-with-map-dictionary-properties-88 > additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema. Consistent with JSON Schema, additionalProperties defaults to true. `additionalProperties: false` especially is important as it's the only way to forbid extra properties.
This commit is contained in:
parent
b30ce51827
commit
7330cd3a68
2
types/swagger-schema-official/index.d.ts
vendored
2
types/swagger-schema-official/index.d.ts
vendored
@ -176,7 +176,7 @@ export type BaseSchema = {
|
||||
export interface Schema extends BaseSchema {
|
||||
$ref?: string;
|
||||
allOf?: Schema[];
|
||||
additionalProperties?: Schema;
|
||||
additionalProperties?: Schema | boolean;
|
||||
properties?: { [propertyName: string]: Schema };
|
||||
discriminator?: string;
|
||||
readOnly?: boolean;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user