Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit eed10a8

Browse files
committed
Adds bool literal
1 parent 2cac483 commit eed10a8

6 files changed

Lines changed: 6 additions & 5 deletions

File tree

samples/client/petstore/python/docs/components/schema/boolean_enum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ type: schemas.Schema
77
## validate method
88
Input Type | Return Type | Notes
99
------------ | ------------- | -------------
10-
bool | bool | must be one of [True]
10+
typing_extensions.Literal[True] | typing_extensions.Literal[True] | must be one of [True]
1111

1212
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{#and ../enumInfo ../enumInfo.typeToValues.boolean}}typing_extensions.Literal[{{#each ../enumInfo.typeToValues.boolean}}{{#if value}}True{{else}}False{{/if}}{{#unless @last}}, {{/unless}}{{/each}}]{{else}}bool{{/and}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#eq types null}}{{#if mapInputJsonPathPiece}}[{{mapInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces mapInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) mapInputJsonPathPiece) }}{{/if}}){{else}}dict{{/if}}, {{> components/schemas/types/_docschema_output_object }}, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, {{#if arrayInputJsonPathPiece}}[{{arrayInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces arrayInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) arrayInputJsonPathPiece) }}{{/if}}){{else}}list{{/if}}, {{> components/schemas/types/_docschema_output_array }}, bytes, io.FileIO, io.BufferedReader{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{#if arrayInputJsonPathPiece}}[{{arrayInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces arrayInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) arrayInputJsonPathPiece) }}{{/if}}){{else}}list{{/if}}, {{> components/schemas/types/_docschema_output_array }}{{/eq}}{{#eq this "object"}}{{#if mapInputJsonPathPiece}}[{{mapInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces mapInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) mapInputJsonPathPiece) }}{{/if}}){{else}}dict{{/if}}, {{> components/schemas/types/_docschema_output_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "date"}}, datetime.date{{/eq}}{{#eq ../format "date-time"}}, datetime.datetime{{/eq}}{{#eq ../format "uuid"}}, uuid.UUID{{/eq}}{{#eq ../format "binary"}}bytes, io.FileIO, io.BufferedReader{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}bool{{/eq}}{{/each}}{{/eq}}{{#if optional}}, schemas.Unset{{/if}}
1+
{{#eq types null}}{{#if mapInputJsonPathPiece}}[{{mapInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces mapInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) mapInputJsonPathPiece) }}{{/if}}){{else}}dict{{/if}}, {{> components/schemas/types/_docschema_output_object }}, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, {{#if arrayInputJsonPathPiece}}[{{arrayInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces arrayInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) arrayInputJsonPathPiece) }}{{/if}}){{else}}list{{/if}}, {{> components/schemas/types/_docschema_output_array }}, bytes, io.FileIO, io.BufferedReader{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{#if arrayInputJsonPathPiece}}[{{arrayInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces arrayInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) arrayInputJsonPathPiece) }}{{/if}}){{else}}list{{/if}}, {{> components/schemas/types/_docschema_output_array }}{{/eq}}{{#eq this "object"}}{{#if mapInputJsonPathPiece}}[{{mapInputJsonPathPiece.camelCase}}](#{{#if identifierPieces}}{{> components/_helper_anchor_id identifierPieces=(append identifierPieces mapInputJsonPathPiece) }}{{else}}{{> components/_helper_anchor_id identifierPieces=(append (newArray ) mapInputJsonPathPiece) }}{{/if}}){{else}}dict{{/if}}, {{> components/schemas/types/_docschema_output_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "date"}}, datetime.date{{/eq}}{{#eq ../format "date-time"}}, datetime.datetime{{/eq}}{{#eq ../format "uuid"}}, uuid.UUID{{/eq}}{{#eq ../format "binary"}}bytes, io.FileIO, io.BufferedReader{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}{{> components/schemas/types/__docschema_bool_type }}{{/eq}}{{/each}}{{/eq}}{{#if optional}}, schemas.Unset{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#with getDeepestRef}}{{#eq types null}}{{> components/schemas/types/_docschema_io_ref_object }}, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, {{> components/schemas/types/_docschema_io_ref_array }}, bytes, io.FileIO, io.BufferedReader{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{> components/schemas/types/_docschema_io_ref_array }}{{/eq}}{{#eq this "object"}}{{> components/schemas/types/_docschema_io_ref_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "date"}}, datetime.date{{/eq}}{{#eq ../format "date-time"}}, datetime.datetime{{/eq}}{{#eq ../format "uuid"}}, uuid.UUID{{/eq}}{{#eq ../format "binary"}}bytes, io.FileIO, io.BufferedReader{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}bool{{/eq}}{{/each}}{{/eq}}{{/with}}{{#if optional}}, schemas.Unset{{/if}}
1+
{{#with getDeepestRef}}{{#eq types null}}{{> components/schemas/types/_docschema_io_ref_object }}, str, datetime.date, datetime.datetime, uuid.UUID, int, float, bool, None, {{> components/schemas/types/_docschema_io_ref_array }}, bytes, io.FileIO, io.BufferedReader{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{> components/schemas/types/_docschema_io_ref_array }}{{/eq}}{{#eq this "object"}}{{> components/schemas/types/_docschema_io_ref_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "date"}}, datetime.date{{/eq}}{{#eq ../format "date-time"}}, datetime.datetime{{/eq}}{{#eq ../format "uuid"}}, uuid.UUID{{/eq}}{{#eq ../format "binary"}}bytes, io.FileIO, io.BufferedReader{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}{{> components/schemas/types/__docschema_bool_type }}{{/eq}}{{/each}}{{/eq}}{{/with}}{{#if optional}}, schemas.Unset{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#eq types null}}{{> components/schemas/types/_docschema_output_object }}, str, float, int, bool, None, {{> components/schemas/types/_docschema_output_array }}, bytes, io.FileIO{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{> components/schemas/types/_docschema_output_array }}{{/eq}}{{#eq this "object"}}{{> components/schemas/types/_docschema_output_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "binary"}}bytes, io.FileIO{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}bool{{/eq}}{{/each}}{{/eq}}{{#if optional}}, schemas.Unset{{/if}}
1+
{{#eq types null}}{{> components/schemas/types/_docschema_output_object }}, str, float, int, bool, None, {{> components/schemas/types/_docschema_output_array }}, bytes, io.FileIO{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{> components/schemas/types/_docschema_output_array }}{{/eq}}{{#eq this "object"}}{{> components/schemas/types/_docschema_output_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "binary"}}bytes, io.FileIO{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}{{> components/schemas/types/__docschema_bool_type }}{{/eq}}{{/each}}{{/eq}}{{#if optional}}, schemas.Unset{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#with getDeepestRef}}{{#eq types null}}{{> components/schemas/types/_docschema_output_ref_object }}, str, float, int, bool, None, {{> components/schemas/types/_docschema_output_ref_array }}, bytes, io.FileIO{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{> components/schemas/types/_docschema_output_ref_array }}{{/eq}}{{#eq this "object"}}{{> components/schemas/types/_docschema_output_ref_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "binary"}}bytes, io.FileIO{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}bool{{/eq}}{{/each}}{{/eq}}{{/with}}{{#if optional}}, schemas.Unset{{/if}}
1+
{{#with getDeepestRef}}{{#eq types null}}{{> components/schemas/types/_docschema_output_ref_object }}, str, float, int, bool, None, {{> components/schemas/types/_docschema_output_ref_array }}, bytes, io.FileIO{{else}}{{#each types}}{{#unless @first}}, {{/unless}}{{#eq this "array"}}{{> components/schemas/types/_docschema_output_ref_array }}{{/eq}}{{#eq this "object"}}{{> components/schemas/types/_docschema_output_ref_object }}{{/eq}}{{#eq this "null"}}None{{/eq}}{{#eq this "string" }}{{#neq ../format "binary"}}{{> components/schemas/types/__docschema_str_type }}{{/neq}}{{#eq ../format "binary"}}bytes, io.FileIO{{/eq}}{{/eq}}{{#eq this "integer"}}{{> components/schemas/types/__docschema_int_type }}{{/eq}}{{#eq this "number"}}float, int{{/eq}}{{#eq this "boolean"}}{{> components/schemas/types/__docschema_bool_type }}{{/eq}}{{/each}}{{/eq}}{{/with}}{{#if optional}}, schemas.Unset{{/if}}

0 commit comments

Comments
 (0)