Skip to content

Commit 4f03bff

Browse files
authored
SObject support (Markdown subcommand) (#198)
1 parent 0a00470 commit 4f03bff

File tree

108 files changed

+6101
-1021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+6101
-1021
lines changed

examples/vitepress/apexdocs.config.ts

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default {
3333
}),
3434
markdown: defineMarkdownConfig({
3535
sourceDir: 'force-app',
36+
includeMetadata: false,
3637
scope: ['global', 'public', 'protected', 'private', 'namespaceaccessible'],
3738
sortAlphabetically: true,
3839
namespace: 'apexdocs',
@@ -50,36 +51,21 @@ export default {
5051
},
5152
excludeTags: ['internal'],
5253
transformDocs: async (docs) => {
54+
const apexOnlyDocs = docs.filter((doc) => doc.type !== 'customobject');
55+
const objectOnlyDocs = docs.filter((doc) => doc.type === 'customobject');
56+
5357
// Update sidebar
5458
const sidebar = [
5559
{
5660
text: 'API Reference',
57-
items: [
58-
{
59-
text: 'Grouped By Type',
60-
items: [
61-
{
62-
text: 'Classes',
63-
items: docs.filter((doc) => doc.source.type === 'class').map(toSidebarLink),
64-
},
65-
{
66-
text: 'Interfaces',
67-
items: docs.filter((doc) => doc.source.type === 'interface').map(toSidebarLink),
68-
},
69-
{
70-
text: 'Enums',
71-
items: docs.filter((doc) => doc.source.type === 'enum').map(toSidebarLink),
72-
},
73-
],
74-
},
75-
{
76-
text: 'Grouped by Group',
77-
items: Array.from(extractGroups(docs)).map(([groupName, groupDocs]) => ({
78-
text: groupName,
79-
items: groupDocs.map(toSidebarLink),
80-
})),
81-
},
82-
],
61+
items: Array.from(extractGroups(apexOnlyDocs)).map(([groupName, groupDocs]) => ({
62+
text: groupName,
63+
items: groupDocs.map(toSidebarLink),
64+
})),
65+
},
66+
{
67+
text: 'Object Reference',
68+
items: objectOnlyDocs.map(toSidebarLink),
8369
},
8470
];
8571
await writeFileAsync('./docs/.vitepress/sidebar.json', JSON.stringify(sidebar, null, 2));

examples/vitepress/docs/.vitepress/sidebar.json

Lines changed: 67 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -3,117 +3,89 @@
33
"text": "API Reference",
44
"items": [
55
{
6-
"text": "Grouped By Type",
6+
"text": "Miscellaneous",
77
"items": [
88
{
9-
"text": "Classes",
10-
"items": [
11-
{
12-
"text": "BaseClass",
13-
"link": "miscellaneous/BaseClass.md"
14-
},
15-
{
16-
"text": "MultiInheritanceClass",
17-
"link": "miscellaneous/MultiInheritanceClass.md"
18-
},
19-
{
20-
"text": "SampleClass",
21-
"link": "samplegroup/SampleClass.md"
22-
},
23-
{
24-
"text": "SampleException",
25-
"link": "miscellaneous/SampleException.md"
26-
},
27-
{
28-
"text": "Url",
29-
"link": "miscellaneous/Url.md"
30-
}
31-
]
9+
"text": "BaseClass",
10+
"link": "miscellaneous/BaseClass.md"
3211
},
3312
{
34-
"text": "Interfaces",
35-
"items": [
36-
{
37-
"text": "ParentInterface",
38-
"link": "miscellaneous/ParentInterface.md"
39-
},
40-
{
41-
"text": "SampleInterface",
42-
"link": "miscellaneous/SampleInterface.md"
43-
}
44-
]
13+
"text": "MultiInheritanceClass",
14+
"link": "miscellaneous/MultiInheritanceClass.md"
4515
},
4616
{
47-
"text": "Enums",
48-
"items": [
49-
{
50-
"text": "ReferencedEnum",
51-
"link": "miscellaneous/ReferencedEnum.md"
52-
},
53-
{
54-
"text": "SampleEnum",
55-
"link": "sample-enums/SampleEnum.md"
56-
}
57-
]
17+
"text": "ParentInterface",
18+
"link": "miscellaneous/ParentInterface.md"
19+
},
20+
{
21+
"text": "ReferencedEnum",
22+
"link": "miscellaneous/ReferencedEnum.md"
23+
},
24+
{
25+
"text": "SampleException",
26+
"link": "miscellaneous/SampleException.md"
27+
},
28+
{
29+
"text": "SampleInterface",
30+
"link": "miscellaneous/SampleInterface.md"
31+
},
32+
{
33+
"text": "Url",
34+
"link": "miscellaneous/Url.md"
5835
}
5936
]
6037
},
6138
{
62-
"text": "Grouped by Group",
39+
"text": "SampleGroup",
6340
"items": [
6441
{
65-
"text": "Miscellaneous",
66-
"items": [
67-
{
68-
"text": "BaseClass",
69-
"link": "miscellaneous/BaseClass.md"
70-
},
71-
{
72-
"text": "MultiInheritanceClass",
73-
"link": "miscellaneous/MultiInheritanceClass.md"
74-
},
75-
{
76-
"text": "ParentInterface",
77-
"link": "miscellaneous/ParentInterface.md"
78-
},
79-
{
80-
"text": "ReferencedEnum",
81-
"link": "miscellaneous/ReferencedEnum.md"
82-
},
83-
{
84-
"text": "SampleException",
85-
"link": "miscellaneous/SampleException.md"
86-
},
87-
{
88-
"text": "SampleInterface",
89-
"link": "miscellaneous/SampleInterface.md"
90-
},
91-
{
92-
"text": "Url",
93-
"link": "miscellaneous/Url.md"
94-
}
95-
]
96-
},
97-
{
98-
"text": "SampleGroup",
99-
"items": [
100-
{
101-
"text": "SampleClass",
102-
"link": "samplegroup/SampleClass.md"
103-
}
104-
]
105-
},
42+
"text": "SampleClass",
43+
"link": "samplegroup/SampleClass.md"
44+
}
45+
]
46+
},
47+
{
48+
"text": "Sample Enums",
49+
"items": [
10650
{
107-
"text": "Sample Enums",
108-
"items": [
109-
{
110-
"text": "SampleEnum",
111-
"link": "sample-enums/SampleEnum.md"
112-
}
113-
]
51+
"text": "SampleEnum",
52+
"link": "sample-enums/SampleEnum.md"
11453
}
11554
]
11655
}
11756
]
57+
},
58+
{
59+
"text": "Object Reference",
60+
"items": [
61+
{
62+
"text": "Event__c",
63+
"link": "custom-objects/Event__c.md"
64+
},
65+
{
66+
"text": "Price_Component__c",
67+
"link": "custom-objects/Price_Component__c.md"
68+
},
69+
{
70+
"text": "Product__c",
71+
"link": "custom-objects/Product__c.md"
72+
},
73+
{
74+
"text": "Product_Price_Component__c",
75+
"link": "custom-objects/Product_Price_Component__c.md"
76+
},
77+
{
78+
"text": "Sales_Order__c",
79+
"link": "custom-objects/Sales_Order__c.md"
80+
},
81+
{
82+
"text": "Sales_Order_Line__c",
83+
"link": "custom-objects/Sales_Order_Line__c.md"
84+
},
85+
{
86+
"text": "Speaker__c",
87+
"link": "custom-objects/Speaker__c.md"
88+
}
89+
]
11890
}
11991
]
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Event__c
3+
---
4+
5+
# Event
6+
7+
Represents an event that people can register for.
8+
9+
## API Name
10+
`apexdocs__Event__c`
11+
12+
## Fields
13+
### Description
14+
15+
**API Name**
16+
17+
`apexdocs__Description__c`
18+
19+
**Type**
20+
21+
*LongTextArea*
22+
23+
---
24+
### End Date
25+
26+
**API Name**
27+
28+
`apexdocs__End_Date__c`
29+
30+
**Type**
31+
32+
*Date*
33+
34+
---
35+
### Location
36+
37+
**API Name**
38+
39+
`apexdocs__Location__c`
40+
41+
**Type**
42+
43+
*Location*
44+
45+
---
46+
### Start Date
47+
48+
**API Name**
49+
50+
`apexdocs__Start_Date__c`
51+
52+
**Type**
53+
54+
*Date*
55+
56+
---
57+
### Tag Line
58+
59+
**API Name**
60+
61+
`apexdocs__Tag_Line__c`
62+
63+
**Type**
64+
65+
*Text*
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Price_Component__c
3+
---
4+
5+
# Price Component
6+
7+
## API Name
8+
`apexdocs__Price_Component__c`
9+
10+
## Fields
11+
### Description
12+
13+
**API Name**
14+
15+
`apexdocs__Description__c`
16+
17+
**Type**
18+
19+
*Text*
20+
21+
---
22+
### Expression
23+
24+
The Expression that determines if this price should take effect or not.
25+
26+
**API Name**
27+
28+
`apexdocs__Expression__c`
29+
30+
**Type**
31+
32+
*LongTextArea*
33+
34+
---
35+
### Percent
36+
37+
Use this field to calculate the price based on the list price's percentage instead of providing a flat price.
38+
39+
**API Name**
40+
41+
`apexdocs__Percent__c`
42+
43+
**Type**
44+
45+
*Percent*
46+
47+
---
48+
### Price
49+
50+
Use this when the Price Component represents a Flat Price. To represent a Percentage use the Percent field.
51+
52+
**API Name**
53+
54+
`apexdocs__Price__c`
55+
56+
**Type**
57+
58+
*Currency*
59+
60+
---
61+
### Type
62+
63+
**API Name**
64+
65+
`apexdocs__Type__c`
66+
67+
**Type**
68+
69+
*Picklist*

0 commit comments

Comments
 (0)