File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,17 @@ You can pass a YAML (or JSON) file to openapi-python-client in order to change s
67
67
are supported:
68
68
69
69
### class_overrides
70
- Used to change the name of generated model classes, especially useful if you have a name like ABCModel which, when
71
- converted to snake case for module naming will be a_b_c_model. This param should be a mapping of existing class name
72
- (usually a key in the "schemas" section of your OpenAPI document) to class_name and module_name.
70
+ Used to change the name of generated model classes. This param should be a mapping of existing class name
71
+ (usually a key in the "schemas" section of your OpenAPI document) to class_name and module_name. As an example, if the
72
+ name of the a model in OpenAPI (and therefore the generated class name) was something like "_ PrivateInternalLongName"
73
+ and you want the generated client's model to be called "ShortName" in a module called "short_name" you could do this:
73
74
74
75
Example:
75
76
``` yaml
76
77
class_overrides :
77
- ABCModel :
78
- class_name : ABCModel
79
- module_name : abc_model
78
+ _PrivateInternalLongName :
79
+ class_name : ShortName
80
+ module_name : short_name
80
81
` ` `
81
82
82
83
The easiest way to find what needs to be overridden is probably to generate your client and go look at everything in the
You can’t perform that action at this time.
0 commit comments