Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ target/
/.illuminatedCloud/
**/tsconfig*.json
**/*.tsbuildinfo

**/graphql.config.yml
1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,25 @@ apexdocs changelog --previousVersionDir force-app-previous --currentVersionDir f

#### Flags

| Flag | Alias | Description | Default | Required |
|-----------------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------|----------|
| `--sourceDir` | `-s` | The directory or directories where the source files are located. | N/A | * |
| `--useSfdxProjectJson` | N/A | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir`. | `false` | * |
| `--sfdxProjectPath` | N/A | Path to directory containing `sfdx-project.json` (defaults to current directory). Only used with `--useSfdxProjectJson`. | `process.cwd()` | No |
| `--targetDir` | `-t` | The directory where the generated files will be placed. | `docs` | No |
| `--scope` | `-p` | A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. | `[global]` | No |
| `--customObjectVisibility` | `-v` | Controls which custom objects are documented. Values should be separated by a space. | `[public]` | No |
| `--defaultGroupName` | N/A | The default group name to use when a group is not specified. | `Miscellaneous` | No |
| `--namespace` | N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No |
| `--sortAlphabetically` | N/A | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. | `false` | No |
| `--includeMetadata ` | N/A | Whether to include the file's meta.xml information: Whether it is active and the API version | `false` | No |
| `--linkingStrategy` | N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none` | `relative` | No |
| `--customObjectsGroupName` | N/A | The name under which custom objects will be grouped in the Reference Guide | `Custom Objects` | No |
| `--triggersGroupName` | N/A | The name under which triggers will be grouped in the Reference Guide | `Triggers` | No |
| `--lwcGroupName` | N/A | The name under which Lightning Web Components will be grouped in the Reference Guide | `Triggers` | No |
| `--includeFieldSecurityMetadata` | N/A | Whether to include the compliance category and security classification for fields in the generated files. | `false` | No |
| `--includeInlineHelpTextMetadata` | N/A | Whether to include the inline help text for fields in the generated files. | `false` | No |
| Flag | Alias | Description | Default | Required |
|-----------------------------------|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|----------|
| `--sourceDir` | `-s` | The directory or directories where the source files are located. | N/A | * |
| `--useSfdxProjectJson` | N/A | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir`. | `false` | * |
| `--sfdxProjectPath` | N/A | Path to directory containing `sfdx-project.json` (defaults to current directory). Only used with `--useSfdxProjectJson`. | `process.cwd()` | No |
| `--targetDir` | `-t` | The directory where the generated files will be placed. | `docs` | No |
| `--scope` | `-p` | A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. | `[global]` | No |
| `--customObjectVisibility` | `-v` | Controls which custom objects are documented. Values should be separated by a space. | `[public]` | No |
| `--defaultGroupName` | N/A | The default group name to use when a group is not specified. | `Miscellaneous` | No |
| `--namespace` | N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No |
| `--sortAlphabetically` | N/A | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. | `false` | No |
| `--includeMetadata ` | N/A | Whether to include the file's meta.xml information: Whether it is active and the API version | `false` | No |
| `--linkingStrategy` | N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none` | `relative` | No |
| `--customObjectsGroupName` | N/A | The name under which custom objects will be grouped in the Reference Guide | `Custom Objects` | No |
| `--triggersGroupName` | N/A | The name under which triggers will be grouped in the Reference Guide | `Triggers` | No |
| `--experimentalLwcSupport` | N/A | Whether to document LWC files or not. | `false` | No |
| `--lwcGroupName` | N/A | The name under which Lightning Web Components will be grouped in the Reference Guide | `Lightning Web Components` | No |
| `--includeFieldSecurityMetadata` | N/A | Whether to include the compliance category and security classification for fields in the generated files. | `false` | No |
| `--includeInlineHelpTextMetadata` | N/A | Whether to include the inline help text for fields in the generated files. | `false` | No |

> **Note:** The `*` in the Required column indicates that **one** of the source directory options must be specified:
> - `--sourceDir` (single directory or array of directories)
Expand Down Expand Up @@ -339,6 +340,9 @@ providing the subcommand, e.g `apexdocs markdown` or `apexdocs changelog`.

### LWC Documentation Limitations

⚠️ LWC documentation is only enabled when providing the `--experimentalLwcSupport` flag or setting the
`experimentalLwcSupport` property to `true` in the configuration file.

ApexDocs supports generating documentation for Lightning Web Components (LWC) as well, but please
be aware of the following limitations:

Expand Down
3 changes: 2 additions & 1 deletion examples/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"sourceDir": "force-app",
"scope": ["global", "public", "protected", "private", "namespaceaccessible"],
"namespace": "ns",
"sortAlphabetically": true
"sortAlphabetically": true,
"experimentalLwcSupport": true
}
}
14 changes: 7 additions & 7 deletions examples/vitepress/docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"hash": "1be9f690",
"hash": "e27cc44a",
"configHash": "7f7b0dad",
"lockfileHash": "538e5018",
"browserHash": "cc0537e6",
"lockfileHash": "66851dcb",
"browserHash": "4e79f947",
"optimized": {
"vue": {
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "2b2c08f3",
"fileHash": "a669ecd4",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "227c4111",
"fileHash": "db43a49d",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "bb45f4ef",
"fileHash": "46684668",
"needsInterop": false
},
"@theme/index": {
"src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "e6db9a93",
"fileHash": "d7d94412",
"needsInterop": false
}
},
Expand Down
3 changes: 3 additions & 0 deletions examples/vitepress/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ These classes are new.

### BaseClass

This is a base class.

{@literal some literal <script>text</script>}
### MultiInheritanceClass

### Url
Expand Down
4 changes: 4 additions & 0 deletions examples/vitepress/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Represents a speaker at an event.

### [BaseClass](miscellaneous/BaseClass)

This is a base class.

{@literal some literal <script>text</script>}

### [MultiInheritanceClass](miscellaneous/MultiInheritanceClass)

### [ParentInterface](miscellaneous/ParentInterface)
Expand Down
13 changes: 13 additions & 0 deletions examples/vitepress/docs/miscellaneous/BaseClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ title: BaseClass
# BaseClass Class
`abstract`

This is a base class.

{@literal some literal <script>text</script>}

## Namespace
apexdocs

## Example
```apex
public class DerivedClass extends BaseClass {
public void sampleMethod() {
// Implementation here
}
}
```

## Fields
### `sampleEnumFromBase`

Expand Down
2 changes: 1 addition & 1 deletion examples/vitepress/docs/miscellaneous/SampleException.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: SampleException

This is a sample exception.

**Usage**
**Usage**

You can use the exception the following way.
You can also take a look at [SampleClass](../samplegroup/SampleClass) to see how it is used.
Expand Down
8 changes: 4 additions & 4 deletions examples/vitepress/docs/miscellaneous/SampleInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: SampleInterface

This is a sample interface

**Mermaid**
**Mermaid**

graph TD
A[SampleInterface] -->|extends| B[ParentInterface]
Expand Down Expand Up @@ -40,15 +40,15 @@ sampleInterface.sampleMethod();

This is a sample method

**Custom Tag**
**Custom Tag**

This is a custom tag

**Another Custom Tag**
**Another Custom Tag**

This is another custom tag

**Mermaid**
**Mermaid**

graph TD
A[SampleInterface] -->|extends| B[ParentInterface]
Expand Down
14 changes: 7 additions & 7 deletions examples/vitepress/docs/miscellaneous/Url.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Url
Represents a uniform resource locator (URL) and provides access to parts of the URL.
Enables access to the base URL used to access your Salesforce org.

**Usage**
**Usage**

Use the methods of the `System.URL` class to create links to objects in your organization. Such objects can be files, images,
logos, or records that you want to include in external emails, in activities, or in Chatter posts. For example, you can create
Expand All @@ -32,7 +32,7 @@ Account acct = [SELECT Id FROM Account WHERE Name = 'Acme' LIMIT 1];
String fullRecordURL = URL.getOrgDomainURL().toExternalForm() + '/' + acct.Id;
```

**Version Behavior Changes**
**Version Behavior Changes**

In API version 41.0 and later, Apex URL objects are represented by the java.net.URI type, not the java.net.URL type.

Expand Down Expand Up @@ -102,7 +102,7 @@ global Url(String spec)

Creates a new instance of the URL class by parsing the specified spec within the specified context.

**Usage**
**Usage**

The new URL is created from the given context URL and the spec argument as described in RFC2396 "Uniform Resource Identifiers : Generic * Syntax" :
```xml
Expand Down Expand Up @@ -181,7 +181,7 @@ The authority portion of the current URL.

Returns the URL of an entire request on a Salesforce instance.

**Usage**
**Usage**

An example of a URL for an entire request is https://yourInstance.salesforce.com/apex/myVfPage.apexp.

Expand All @@ -201,7 +201,7 @@ The URL of the entire request.

Returns the default port number of the protocol associated with the current URL.

**Usage**
**Usage**

Returns -1 if the URL scheme or the stream protocol handler for the URL doesn't define a default port number.

Expand Down Expand Up @@ -281,15 +281,15 @@ The host name of the current URL.

Returns the canonical URL for your org. For example, https://MyDomainName.my.salesforce.com.

**Usage**
**Usage**

Use getOrgDomainUrl() to interact with Salesforce REST and SOAP APIs in Apex code. Get endpoints for User Interface API calls, for creating and customizing picklist value sets and custom fields, and more.

`getOrgDomainUrl()` can access the domain URL only for the org in which the Apex code is running.

You don't need a RemoteSiteSetting for your org to interact with the Salesforce APIs using domain URLs retrieved with this method.

**See Also**
**See Also**

* [Lightning Aura Components Developer Guide: Making API Calls from Apex](https://developer.salesforce.com/docs/atlas.en-us.250.0.lightning.meta/lightning/apex_api_calls.htm)

Expand Down
4 changes: 2 additions & 2 deletions examples/vitepress/docs/sample-enums/SampleEnum.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ This is a sample enum. This references [ReferencedEnum](../miscellaneous/Referen

This description has several lines

**Some Custom**
**Some Custom**

Test. I can also have a [ReferencedEnum](../miscellaneous/ReferencedEnum) here.
And it can be multiline.

**Mermaid**
**Mermaid**

graph TD
A[SampleEnum] -->|references| B[ReferencedEnum]
Expand Down
12 changes: 12 additions & 0 deletions examples/vitepress/force-app/main/default/classes/BaseClass.cls
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/**
* This is a base class.
* @example
* {@code
* public class DerivedClass extends BaseClass {
* public void sampleMethod() {
* // Implementation here
* }
* }
* }
*
*/
public abstract class BaseClass {
public SampleEnum sampleEnumFromBase;
}
Loading