Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1fa746d
Initial commit.
cesarParra Nov 6, 2024
6c25c16
Refactoring picklist parsing to a generic file for reuse
cesarParra Nov 6, 2024
955ecbd
Picklist support for inline fields
cesarParra Nov 6, 2024
88a7e45
UTs
cesarParra Nov 6, 2024
d456407
Merge pull request #209 from cesarParra/parse-objects-with-inline-fields
cesarParra Nov 6, 2024
09fef8d
Documenting "extension" fields.
cesarParra Nov 8, 2024
734d86b
Refactoring types to account for external metadata
cesarParra Nov 9, 2024
dc05405
Refactoring types to account for external metadata
cesarParra Nov 11, 2024
fa32f6d
Uts
cesarParra Nov 11, 2024
4250e94
Uts
cesarParra Nov 11, 2024
2348882
Merge pull request #210 from cesarParra/orphan-fields-documentation
cesarParra Nov 11, 2024
c1255d4
Example: Linking to custom object
cesarParra Nov 11, 2024
d4bc56c
Merge pull request #211 from cesarParra/linking-custom-objects
cesarParra Nov 11, 2024
190cbaf
New members include their descriptions (if present)
cesarParra Nov 11, 2024
2f49b65
Merge pull request #212 from cesarParra/description-in-new-changelog-…
cesarParra Nov 11, 2024
c810b28
Marking required fields when generating custom field documentation
cesarParra Nov 11, 2024
aa60bec
Merge pull request #213 from cesarParra/custom-object-mark-if-required
cesarParra Nov 11, 2024
bb74099
Front matter support for changelog files.
cesarParra Nov 13, 2024
cea4495
Front matter support for changelog files.
cesarParra Nov 13, 2024
0f20c22
Merge pull request #214 from cesarParra/changelog-frontmatter-support
cesarParra Nov 13, 2024
cbfb2b3
Upgrades to Apex Reflection version 2.16.0
cesarParra Nov 13, 2024
88365b6
Merge pull request #215 from cesarParra/reflection-2-16
cesarParra Nov 13, 2024
5c5a1b6
3.6 docs
cesarParra Nov 15, 2024
424c3c0
3.6 release
cesarParra Nov 15, 2024
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
38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,11 @@ of different hooks that will be called at different stages of the documentation

All hooks can be async functions, allowing you to make asynchronous operations, like calling an external API.

📒 Note: The extension hook functions are only available when generating Markdown files (not OpenApi).
There are hooks for both Markdown and Changelog operations (but not for OpenApi).

#### **transformReferenceGuide**
#### Markdown Hooks

##### **transformReferenceGuide**

Allows changing the Allows changing the frontmatter and content of the reference guide, or even if creating a reference
guide page should be skipped.
Expand Down Expand Up @@ -374,7 +376,7 @@ export default defineMarkdownConfig({
});
```

#### **transformDocs**
##### **transformDocs**

The main purpose of this hook is to allow you to skip the generation of specific pages,
by returning a filtered array of `DocPageData` objects.
Expand All @@ -397,7 +399,7 @@ export default {
};
```

#### **transformDocPage**
##### **transformDocPage**

Allows changing the frontmatter and content of the doc page.

Expand All @@ -421,7 +423,7 @@ export default {
};
```

#### **transformReference**
##### **transformReference**

Allows changing where the files are written to and how files are linked to each other.

Expand Down Expand Up @@ -449,6 +451,32 @@ export default {
};
```

#### Changelog Hooks

##### **transformChangeLogPage**

Allows changing the frontmatter and content of the changelog page.

**Type**

```typescript
type TransformChangeLogPage = (
changelog: ChangeLogPageData,
) => Partial<ChangeLogPageData> | Promise<Partial<ChangeLogPageData>>
```

Example

```typescript
export default {
transformChangeLogPage: (changelog) => {
return {
frontmatter: { example: 'example' }
};
}
};
```

## ⤵︎ Importing to your project

### Reflection
Expand Down
7 changes: 7 additions & 0 deletions examples/vitepress/apexdocs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ export default {
previousVersionDir: 'previous',
currentVersionDir: 'force-app',
scope: ['global', 'public', 'protected', 'private', 'namespaceaccessible'],
transformChangeLogPage: () => {
return {
frontmatter: {
title: 'Changelog',
},
};
},
}),
markdown: defineMarkdownConfig({
sourceDir: 'force-app',
Expand Down
8 changes: 8 additions & 0 deletions examples/vitepress/docs/.vitepress/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
{
"text": "Object Reference",
"items": [
{
"text": "Contact",
"link": "custom-objects/Contact.md"
},
{
"text": "Event__c",
"link": "custom-objects/Event__c.md"
Expand All @@ -70,6 +74,10 @@
"text": "Product__c",
"link": "custom-objects/Product__c.md"
},
{
"text": "Product_Inline_Fields__c",
"link": "custom-objects/Product_Inline_Fields__c.md"
},
{
"text": "Product_Price_Component__c",
"link": "custom-objects/Product_Price_Component__c.md"
Expand Down
17 changes: 16 additions & 1 deletion examples/vitepress/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Changelog
---

# Changelog

## New Classes
Expand Down Expand Up @@ -51,6 +55,9 @@ These custom objects are new.
Represents an event that people can register for.
### Price_Component__c

### Product_Inline_Fields__c

Products
### Product_Price_Component__c

### Product__c
Expand All @@ -64,4 +71,12 @@ Represents a line item on a sales order.
Custom object for tracking sales orders.
### Speaker__c

Represents a speaker at an event.
Represents a speaker at an event.

## New or Removed Fields to Custom Objects or Standard Objects

These custom fields have been added or removed.

### Contact

- New Field: PhotoUrl__c. URL of the contact&#x27;s photo
21 changes: 21 additions & 0 deletions examples/vitepress/docs/custom-objects/Contact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Contact
---

# Contact

## API Name
`apexdocs__Contact`

## Fields
### PhotoUrl

URL of the contact&#x27;s photo

**API Name**

`apexdocs__PhotoUrl__c`

**Type**

*Url*
3 changes: 3 additions & 0 deletions examples/vitepress/docs/custom-objects/Event__c.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Represents an event that people can register for.

---
### End Date
**Required**

**API Name**

Expand All @@ -33,6 +34,7 @@ Represents an event that people can register for.

---
### Location
**Required**

**API Name**

Expand All @@ -44,6 +46,7 @@ Represents an event that people can register for.

---
### Start Date
**Required**

**API Name**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Use this when the Price Component represents a Flat Price. To represent a Percen

---
### Type
**Required**

**API Name**

Expand Down
114 changes: 114 additions & 0 deletions examples/vitepress/docs/custom-objects/Product_Inline_Fields__c.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
title: Product_Inline_Fields__c
---

# Products

Products

## API Name
`apexdocs__Product_Inline_Fields__c`

## Fields
### DiscontinuedDate

The date the product got discontinued

**API Name**

`apexdocs__DiscontinuedDate__c`

**Type**

*DateTime*

---
### ID

**API Name**

`apexdocs__ID__c`

**Type**

*Number*

---
### Name
**Required**

Product name

**API Name**

`apexdocs__Name__c`

**Type**

*Text*

---
### Price

Product price in the default currency

**API Name**

`apexdocs__Price__c`

**Type**

*Number*

---
### Products

**API Name**

`apexdocs__Products__c`

**Type**

*ExternalLookup*

---
### Rating

Rating

**API Name**

`apexdocs__Rating__c`

**Type**

*Number*

---
### ReleaseDate

ReleaseDate

**API Name**

`apexdocs__ReleaseDate__c`

**Type**

*DateTime*

---
### Type
**Required**

**API Name**

`apexdocs__Type__c`

**Type**

*Picklist*

#### Possible values are
* Merchandise
* Bundle
1 change: 1 addition & 0 deletions examples/vitepress/docs/custom-objects/Product__c.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Product that is sold or available for sale.

---
### Event
**Required**

**API Name**

Expand Down
3 changes: 3 additions & 0 deletions examples/vitepress/docs/custom-objects/Sales_Order_Line__c.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Represents a line item on a sales order.

## Fields
### Amount
**Required**

**API Name**

Expand All @@ -22,6 +23,7 @@ Represents a line item on a sales order.

---
### Product
**Required**

**API Name**

Expand Down Expand Up @@ -55,6 +57,7 @@ Represents a line item on a sales order.

---
### Type
**Required**

**API Name**

Expand Down
6 changes: 6 additions & 0 deletions examples/vitepress/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ hero:

## Custom Objects

### [Contact](custom-objects/Contact)

### [Event__c](custom-objects/Event__c)

Represents an event that people can register for.
Expand All @@ -29,6 +31,10 @@ Represents an event that people can register for.

Product that is sold or available for sale.

### [Product_Inline_Fields__c](custom-objects/Product_Inline_Fields__c)

Products

### [Product_Price_Component__c](custom-objects/Product_Price_Component__c)

### [Sales_Order__c](custom-objects/Sales_Order__c)
Expand Down
2 changes: 2 additions & 0 deletions examples/vitepress/docs/samplegroup/SampleClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ aliquip ex sunt officia ullamco anim deserunt magna aliquip nisi eiusmod in sit

**Group** SampleGroup

**See** [Event__c](../custom-objects/Event__c)

## Namespace
apexdocs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* @description aliquip ex sunt officia ullamco anim deserunt magna aliquip nisi eiusmod in sit officia veniam ex
* **deserunt** ea officia exercitation laboris enim in duis quis enim eiusmod eu amet cupidatat.
* @group SampleGroup
* @see Event__c
* @example
* SampleClass sample = new SampleClass();
* sample.doSomething();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
<required>false</required>
<trackFeedHistory>false</trackFeedHistory>
<type>Url</type>
<description>URL of the contact's photo</description>
</CustomField>
Loading
Loading