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

Commit 09ed9ca

Browse files
committed
Fixes detection of self references in schema docs for output types
1 parent ecbc7f9 commit 09ed9ca

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ get_additional_property_ | str | schemas.immutabledict, tuple, float, int, str,
5353
## anyOf
5454
Schema Class | Input Type | Return Type
5555
------------ | ---------- | -----------
56-
[**AbstractStepMessage**](#top) | [abstract_step_message.AbstractStepMessageDictInput](../../components/schema/abstract_step_message.md#abstractstepmessagedictinput), [abstract_step_message.AbstractStepMessageDict](../../components/schema/abstract_step_message.md#abstractstepmessagedict) | [abstract_step_message.AbstractStepMessageDict](../../components/schema/abstract_step_message.md#abstractstepmessagedict)
56+
[**AbstractStepMessage**](#top) | [abstract_step_message.AbstractStepMessageDictInput](../../components/schema/abstract_step_message.md#abstractstepmessagedictinput), [AbstractStepMessageDict](#abstractstepmessagedict) | [AbstractStepMessageDict](#abstractstepmessagedict)
5757

5858
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type: typing.Mapping[str, schemas.INPUT_TYPES_ALL]
1919
Key | Type | Description | Notes
2020
------------ | ------------- | ------------- | -------------
2121
**name** | str | | [optional]
22-
**enemyPlayer** | [player.PlayerDictInput](../../components/schema/player.md#playerdictinput), [player.PlayerDict](../../components/schema/player.md#playerdict) | | [optional]
22+
**enemyPlayer** | [player.PlayerDictInput](../../components/schema/player.md#playerdictinput), [PlayerDict](#playerdict) | | [optional]
2323
**any_string_name** | dict, schemas.immutabledict, list, tuple, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader | any string name can be used but the value must be the correct type | [optional]
2424

2525
## PlayerDict
@@ -30,14 +30,14 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]
3030
Keyword Argument | Type | Description | Notes
3131
---------------- | ---- | ----------- | -----
3232
**name** | str, schemas.Unset | | [optional]
33-
**enemyPlayer** | [player.PlayerDictInput](../../components/schema/player.md#playerdictinput), [player.PlayerDict](../../components/schema/player.md#playerdict), schemas.Unset | | [optional]
33+
**enemyPlayer** | [player.PlayerDictInput](../../components/schema/player.md#playerdictinput), [PlayerDict](#playerdict), schemas.Unset | | [optional]
3434
**kwargs** | dict, schemas.immutabledict, list, tuple, float, int, str, datetime.date, datetime.datetime, uuid.UUID, bool, None, bytes, io.FileIO, io.BufferedReader | any string name can be used but the value must be the correct type a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties | [optional] typed value is accessed with the get_additional_property_ method
3535

3636
### properties
3737
Property | Type | Description | Notes
3838
-------- | ---- | ----------- | -----
3939
**name** | str, schemas.Unset | | [optional]
40-
**enemyPlayer** | [player.PlayerDict](../../components/schema/player.md#playerdict), schemas.Unset | | [optional]
40+
**enemyPlayer** | [PlayerDict](#playerdict), schemas.Unset | | [optional]
4141

4242
### methods
4343
Method | Input Type | Return Type | Notes

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type: typing.Union[
2929
```
3030
List/Tuple Item Type | Description | Notes
3131
-------------------- | ------------- | -------------
32-
[self_referencing_array_model.SelfReferencingArrayModelTupleInput](../../components/schema/self_referencing_array_model.md#selfreferencingarraymodeltupleinput), [self_referencing_array_model.SelfReferencingArrayModelTuple](../../components/schema/self_referencing_array_model.md#selfreferencingarraymodeltuple) | |
32+
[self_referencing_array_model.SelfReferencingArrayModelTupleInput](../../components/schema/self_referencing_array_model.md#selfreferencingarraymodeltupleinput), [SelfReferencingArrayModelTuple](#selfreferencingarraymodeltuple) | |
3333

3434
## SelfReferencingArrayModelTuple
3535
```
@@ -47,6 +47,6 @@ configuration | typing.Optional[schema_configuration.SchemaConfiguration] = None
4747
### methods
4848
Method | Input Type | Return Type | Notes
4949
------ | ---------- | ----------- | ------
50-
__getitem__ | int | [self_referencing_array_model.SelfReferencingArrayModelTuple](../../components/schema/self_referencing_array_model.md#selfreferencingarraymodeltuple) | This method is used under the hood when instance[0] is called
50+
__getitem__ | int | [SelfReferencingArrayModelTuple](#selfreferencingarraymodeltuple) | This method is used under the hood when instance[0] is called
5151

5252
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ type: typing.Mapping[
2727
```
2828
Key | Type | Description | Notes
2929
------------ | ------------- | ------------- | -------------
30-
**selfRef** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [self_referencing_object_model.SelfReferencingObjectModelDict](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldict) | | [optional]
31-
**any_string_name** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [self_referencing_object_model.SelfReferencingObjectModelDict](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldict) | any string name can be used but the value must be the correct type | [optional]
30+
**selfRef** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict) | | [optional]
31+
**any_string_name** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict) | any string name can be used but the value must be the correct type | [optional]
3232

3333
## SelfReferencingObjectModelDict
3434
```
@@ -38,18 +38,18 @@ base class: schemas.immutabledict[str, schemas.OUTPUT_BASE_TYPES]
3838
### __new__ method
3939
Keyword Argument | Type | Description | Notes
4040
---------------- | ---- | ----------- | -----
41-
**selfRef** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [self_referencing_object_model.SelfReferencingObjectModelDict](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldict), schemas.Unset | | [optional]
42-
**kwargs** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [self_referencing_object_model.SelfReferencingObjectModelDict](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldict) | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method
41+
**selfRef** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict), schemas.Unset | | [optional]
42+
**kwargs** | [self_referencing_object_model.SelfReferencingObjectModelDictInput](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldictinput), [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict) | any string name can be used but the value must be the correct type | [optional] typed value is accessed with the get_additional_property_ method
4343

4444
### properties
4545
Property | Type | Description | Notes
4646
-------- | ---- | ----------- | -----
47-
**selfRef** | [self_referencing_object_model.SelfReferencingObjectModelDict](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldict), schemas.Unset | | [optional]
47+
**selfRef** | [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict), schemas.Unset | | [optional]
4848

4949
### methods
5050
Method | Input Type | Return Type | Notes
5151
------ | ---------- | ----------- | ------
5252
from_dict_ | [SelfReferencingObjectModelDictInput](#selfreferencingobjectmodeldictinput), [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict) | [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict) | a constructor
53-
get_additional_property_ | str | [self_referencing_object_model.SelfReferencingObjectModelDict](../../components/schema/self_referencing_object_model.md#selfreferencingobjectmodeldict), schemas.Unset | provides type safety for additional properties
53+
get_additional_property_ | str | [SelfReferencingObjectModelDict](#selfreferencingobjectmodeldict), schemas.Unset | provides type safety for additional properties
5454

5555
[[Back to top]](#top) [[Back to Component Schemas]](../../../README.md#Component-Schemas) [[Back to README]](../../../README.md)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#if arrayOutputJsonPathPiece}}[{{jsonPathPiece.snakeCase}}.{{arrayOutputJsonPathPiece.camelCase}}]({{docRoot}}{{pathFromDocRoot}}.md#{{arrayOutputJsonPathPiece.anchorPiece}}){{else}}tuple{{/if}}
1+
{{#if arrayOutputJsonPathPiece}}[{{#unless selfRef}}{{jsonPathPiece.snakeCase}}.{{/unless}}{{arrayOutputJsonPathPiece.camelCase}}]({{#unless selfRef}}{{docRoot}}{{pathFromDocRoot}}.md{{/unless}}#{{arrayOutputJsonPathPiece.anchorPiece}}){{else}}tuple{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#if mapOutputJsonPathPiece}}[{{jsonPathPiece.snakeCase}}.{{mapOutputJsonPathPiece.camelCase}}]({{docRoot}}{{pathFromDocRoot}}.md#{{mapOutputJsonPathPiece.anchorPiece}}){{else}}schemas.immutabledict{{/if}}
1+
{{#if mapOutputJsonPathPiece}}[{{#unless selfRef}}{{jsonPathPiece.snakeCase}}.{{/unless}}{{mapOutputJsonPathPiece.camelCase}}]({{#unless selfRef}}{{docRoot}}{{pathFromDocRoot}}.md{{/unless}}#{{mapOutputJsonPathPiece.anchorPiece}}){{else}}schemas.immutabledict{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#if refInfo.refClass}}{{> components/schemas/types/_docschema_io_ref_types }}{{else}}{{> components/schemas/types/_docschema_io_inline_types }}{{/if}}
1+
{{#if refInfo.refClass}}{{> components/schemas/types/_docschema_io_ref_types selfRef=(eq refInfo.refModule null) }}{{else}}{{> components/schemas/types/_docschema_io_inline_types }}{{/if}}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#if refInfo.refClass}}{{> components/schemas/types/_docschema_output_ref_types }}{{else}}{{> components/schemas/types/_docschema_output_inline_types }}{{/if}}
1+
{{#if refInfo.refClass}}{{> components/schemas/types/_docschema_output_ref_types selfRef=(eq refInfo.refModule null) }}{{else}}{{> components/schemas/types/_docschema_output_inline_types }}{{/if}}

0 commit comments

Comments
 (0)