Skip to content

Commit eece73d

Browse files
committed
Documentation fixes
1 parent cd9b49b commit eece73d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ apexdocs-generate -s ./src -t docs -g openapi --openApiTitle "Custom OpenApi Tit
344344

345345
### How It Works
346346

347-
When generating an OpenApi document, since `@RestResource` need to be global in Apex, the `--scope` parameter will be ignored.
347+
When generating an OpenApi document, since `@RestResource` classes need to be global in Apex, the `--scope` parameter will be ignored.
348348
Instead, ApexDocs will run through all classes annotated with `@RestResource` and add it to the output OpenApi file.
349349

350350
Once it finishes running, a file named `openapi.json` will be created in the specified `--targetDir`.
@@ -363,7 +363,7 @@ some custom annotations that are specific to generating OpenApi definitions:
363363

364364
#### @http-request-body
365365

366-
Allows you to specify the HTTP Request's expected Request Body. It supports receiving a `description`,
366+
Allows you to specify the HTTP request's expected request body. It supports receiving a `description`,
367367
whether it is `required` or not, and a `schema`, which defines the shape of the object that is expected.
368368

369369
📝 Note that only one `@http-request-body` should be defined per method. If you add more than one, only
@@ -380,6 +380,7 @@ Example
380380
* description: This is an example of a request body
381381
* required: true
382382
* schema: ClassName
383+
*/
383384
@HttpPost
384385
global static void doPost() {
385386
///...
@@ -476,21 +477,24 @@ to convert that to a valid specification. For this use case, define a Custom Sch
476477
* @http-request-body
477478
* description: This is an example of a request body
478479
* schema: List<ClassName>
480+
*/
479481
@HttpPost
480482
global static void doPost() {
481483
///...
482484
}
483485
```
484486

485487
Inner class references are also supported, but note that you need to pass the full name of the reference,
486-
by using the `ParentClassName.InnerClassName` syntax.
488+
by using the `ParentClassName.InnerClassName` syntax, even if the inner class resides on the same class as the HTTP method
489+
referencing it.
487490

488491
```apex
489492
/**
490493
* @description This is a sample HTTP Post method
491494
* @http-request-body
492495
* description: This is an example of a request body
493496
* schema: ParentClass.InnerClass
497+
*/
494498
@HttpPost
495499
global static void doPost() {
496500
///...

0 commit comments

Comments
 (0)