Skip to content

Commit 200e839

Browse files
committed
fix(docs): Replace PascalCase with camelCase
1 parent 05a0849 commit 200e839

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/api-guide/schemas.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ class MyView(APIView):
290290

291291
### OperationId
292292

293-
The schema generator generates an [operationid](openapi-operationid) for each operation. This `operationId` is deduced from the model name, serializer name or view name. The operationId may looks like "ListItems", "RetrieveItem", "UpdateItem", etc..
293+
The schema generator generates an [operationid](openapi-operationid) for each operation. This `operationId` is deduced from the model name, serializer name or view name. The operationId may looks like "listItems", "retrieveItem", "updateItem", etc..
294+
The `operationId` is camelCase by convention.
294295

295296
If you have several views with the same model, the generator may generate duplicate operationId.
296297
In order to work around this, you can override the second part of the operationId: operation name.
@@ -303,7 +304,7 @@ class ExampleView(APIView):
303304
schema = AutoSchema(operation_id_base="Custom")
304305
```
305306

306-
The previous example will generate the following operationId: "ListCustoms", "RetrieveCustom", "UpdateCustom", "PartialUpdateCustom", "DestroyCustom".
307+
The previous example will generate the following operationId: "listCustoms", "retrieveCustom", "updateCustom", "partialUpdateCustom", "destroyCustom".
307308
You need to provide the singular form of he operation name. For the list operation, a "s" will be appended at the end of the operation.
308309

309310
If you need more configuration over the `operationId` field, you can override the `get_operation_id_base` and `get_operation_id` methods from the `AutoSchema` class:

0 commit comments

Comments
 (0)