Skip to content

Commit e0ceadf

Browse files
committed
Release v0.0.24
1 parent d73de92 commit e0ceadf

File tree

8 files changed

+847
-346
lines changed

8 files changed

+847
-346
lines changed

.mock/definition/feature.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
types:
22
FeatureId:
3-
docs: |
4-
A unique identifier for a feature (e.g. OPTIONALS). This is typed as a freeform string
5-
to allow for arbitrary features, but callers are expected to use the FeatureType
6-
string representation whenever possible.
7-
type: string
3+
discriminated: false
4+
union:
5+
- string
6+
- StructuredFeatureId
7+
docs: >
8+
A unique identifier for a feature (e.g. OPTIONALS). This is typed as a
9+
freeform string
810
9-
FeatureType:
10-
docs: |
11-
Unique identifiers for features that can be demonstrated with snippets.
11+
to allow for arbitrary features, but callers are expected to use the
12+
StructuredFeatureId
13+
14+
string representation whenever possible.
15+
StructuredFeatureId:
1216
enum:
1317
- AUTHENTICATION
1418
- ERRORS
@@ -18,22 +22,28 @@ types:
1822
- REQUEST_OPTIONS
1923
- STREAMING
2024
- TIMEOUTS
21-
22-
FeatureConfig:
25+
- CUSTOM_CLIENT
2326
docs: |
24-
The configuration used to specify a generator's set of supported features.
25-
This is static data associated with a particular version of a generator, and
26-
is expected to be written as a static features.yml file in the generator's
27-
repository.
27+
Unique identifiers for features that can be demonstrated with snippets.
28+
FeatureConfig:
2829
properties:
2930
features: list<FeatureSpec>
31+
docs: >
32+
The configuration used to specify a generator's set of supported features.
33+
34+
This is static data associated with a particular version of a generator,
35+
and
36+
37+
is expected to be written as a static features.yml file in the generator's
3038
39+
repository.
3140
FeatureSpec:
32-
docs: |
33-
A specification for a feature supported by a generator. This includes the
34-
feature's ID, a description, and any additional information that should be
35-
included in the README.md.
3641
properties:
3742
id: FeatureId
3843
description: optional<string>
3944
addendum: optional<string>
45+
advanced: optional<boolean>
46+
docs: |
47+
A specification for a feature supported by a generator. This includes the
48+
feature's ID, a description, and any additional information that should be
49+
included in the README.md.

.mock/definition/github.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
types:
2+
GitHubConfig:
3+
properties:
4+
sourceDirectory:
5+
type: string
6+
docs: >-
7+
The directory from which to read the contents of the GitHub
8+
repository.
9+
uri:
10+
type: string
11+
docs: The URI of the GitHub repository.
12+
token:
13+
type: string
14+
docs: The token used to access the GitHub repository.
15+
branch:
16+
type: optional<string>
17+
docs: The branch to use when interacting with the GitHub repository.
18+
docs: |
19+
The configuration used to interact with a GitHub repository.

.mock/definition/readme.yml

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,113 +2,115 @@ imports:
22
feature: feature.yml
33
types:
44
ReadmeConfig:
5-
docs: |
6-
The configuration used to generate a README.md file.
7-
8-
The information described here is a combination of user-defined information
9-
(i.e. specified in the generators.yml), and dynamically generated information
10-
that comes from each generator (i.e. features, requirements, and more).
115
properties:
6+
remote:
7+
type: optional<Remote>
8+
docs: >
9+
If specified, the original README.md will be fetched from this remote
10+
(if it exists).
1211
language: LanguageInfo
1312
organization: string
1413
bannerLink: optional<string>
15-
docsLink: optional<string>
14+
introduction: optional<string>
15+
apiReferenceLink: optional<string>
16+
referenceMarkdownPath: optional<string>
1617
requirements: optional<list<string>>
1718
features:
19+
type: optional<list<ReadmeFeature>>
1820
docs: |
1921
Specifies the list of features supported by a specific generator.
2022
The features are rendered in the order they're specified.
21-
type: optional<list<ReadmeFeature>>
23+
docs: >
24+
The configuration used to generate a README.md file.
2225
23-
ReadmeFeature:
26+
The information described here is a combination of user-defined
27+
information
28+
29+
(i.e. specified in the generators.yml), and dynamically generated
30+
information
31+
32+
that comes from each generator (i.e. features, requirements, and more).
33+
Remote:
34+
union:
35+
github: GithubRemote
2436
docs: |
25-
A single feature supported by a generator (e.g. PAGINATION).
37+
The remote where the README.md is hosted.
38+
GithubRemote:
39+
properties:
40+
repoUrl:
41+
type: string
42+
docs: A full repo url (i.e. https://github.com/fern-api/fern)
43+
installationToken:
44+
type: string
45+
docs: The token used to clone the GitHub repository.
46+
ReadmeFeature:
47+
extends: feature.FeatureSpec
2648
properties:
27-
id: feature.FeatureId
28-
description: optional<string>
29-
addendum: optional<string>
3049
snippets: optional<list<string>>
3150
snippetsAreOptional:
32-
docs: |
33-
If true, the feature block should be rendered even if we don't receive a snippet for it.
34-
This is useful for features that are always supported, but might not require a snippet
35-
to explain.
3651
type: boolean
52+
docs: >
53+
If true, the feature block should be rendered even if we don't receive
54+
a snippet for it.
3755
38-
LanguageInfo:
39-
docs: |
40-
The language and its associated publish information (if any).
56+
This is useful for features that are always supported, but might not
57+
require a snippet
4158
42-
This is used to generate badges, the installation guide, and determine what language to
43-
use when surrounding the snippets in a code block.
59+
to explain.
60+
docs: |
61+
A single feature supported by a generator (e.g. PAGINATION).
62+
LanguageInfo:
4463
union:
4564
typescript: TypescriptInfo
4665
python: PythonInfo
4766
go: GoInfo
4867
java: JavaInfo
4968
ruby: RubyInfo
5069
csharp: CsharpInfo
70+
docs: >
71+
The language and its associated publish information (if any).
72+
73+
This is used to generate badges, the installation guide, and determine
74+
what language to
5175
76+
use when surrounding the snippets in a code block.
5277
TypescriptInfo:
5378
properties:
54-
title: literal<"TypeScript">
55-
format: literal<"ts">
5679
publishInfo: optional<NpmPublishInfo>
57-
5880
PythonInfo:
5981
properties:
60-
title: literal<"Python">
61-
format: literal<"python">
6282
publishInfo: optional<PypiPublishInfo>
63-
6483
GoInfo:
6584
properties:
66-
title: literal<"Go">
67-
format: literal<"go">
6885
publishInfo: optional<GoPublishInfo>
69-
7086
JavaInfo:
7187
properties:
72-
title: literal<"Java">
73-
format: literal<"java">
7488
publishInfo: optional<MavenPublishInfo>
75-
7689
RubyInfo:
7790
properties:
78-
title: literal<"Ruby">
79-
format: literal<"ruby">
8091
publishInfo: optional<RubyGemsPublishInfo>
81-
8292
CsharpInfo:
8393
properties:
84-
title: literal<"C#">
85-
format: literal<"csharp">
8694
publishInfo: optional<NugetPublishInfo>
87-
8895
NpmPublishInfo:
8996
properties:
9097
packageName: string
91-
9298
PypiPublishInfo:
9399
properties:
94100
packageName: string
95-
96101
GoPublishInfo:
97102
properties:
98103
owner: string
99104
repo: string
100105
version: string
101-
102106
MavenPublishInfo:
103107
properties:
104108
artifact: string
105109
group: string
106110
version: string
107-
108111
RubyGemsPublishInfo:
109112
properties:
110113
packageName: string
111-
112114
NugetPublishInfo:
113115
properties:
114116
packageName: string

.mock/definition/reference.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
types:
2+
ReferenceConfig:
3+
properties:
4+
rootSection: optional<RootPackageReferenceSection>
5+
sections: list<ReferenceSection>
6+
language:
7+
type: Language
8+
docs: >-
9+
Similar to in README generation, the language property is used to
10+
determine the language to use when generating code blocks in markdown.
11+
docs: >
12+
The information to include within the `reference.md` file generated by the
13+
CLI.
14+
15+
The information here should really be all defined by the generator, and
16+
not user provided.
17+
18+
We intentionally keep this a bit flexible in the event SDKs structure
19+
their package/module
20+
21+
references in a unique way for the same API.
22+
RootPackageReferenceSection:
23+
properties:
24+
description: optional<string>
25+
endpoints: list<EndpointReference>
26+
ReferenceSection:
27+
properties:
28+
title: string
29+
description: optional<string>
30+
endpoints: list<EndpointReference>
31+
EndpointReference:
32+
properties:
33+
title:
34+
type: MethodInvocationSnippet
35+
docs: >
36+
The title is a code snippet that is shown when the endpoint's
37+
reference is collapsed.
38+
39+
For example, `client.subpackage.method({ ...params }) -> ReturnValue`.
40+
description: optional<string>
41+
snippet:
42+
type: string
43+
docs: |
44+
A "full" snippet, showing all the parameters, with a full example.
45+
```typescript
46+
await client.subpackage.method({
47+
expiresIn: 300,
48+
});
49+
```
50+
parameters: list<ParameterReference>
51+
MethodInvocationSnippet:
52+
properties:
53+
snippetParts: list<LinkedText>
54+
returnValue: optional<LinkedText>
55+
docs: >
56+
The method invocation snippet is one which appears when the endpoint's
57+
reference is collapsed.
58+
59+
It is meant to give a high-level overview of the endpoint -- e.g. the
60+
method name and it's return value.
61+
62+
The snippet itself should be a list of concatable content, which the CLI
63+
will handle hyperlinking. Note that this
64+
65+
will essentially just be a "".join(snippetParts), so you must handle
66+
making sure the right `.`, etc. are in the parts.
67+
68+
Note this is a separate object to make it easier to add additional
69+
properties down the road, for example if
70+
71+
we wanted to be specific about what portion of the snippet we hyperlink,
72+
etc.
73+
LinkedText:
74+
properties:
75+
text: string
76+
location: optional<RelativeLocation>
77+
ParameterReference:
78+
properties:
79+
name: string
80+
description: optional<string>
81+
location: optional<RelativeLocation>
82+
type: string
83+
required: boolean
84+
RelativeLocation:
85+
properties:
86+
path:
87+
type: string
88+
docs: >
89+
A relative location is a path to a file or directory relative to the
90+
root of the repository.
91+
92+
This is used to specify a link for a type or a function that the
93+
`reference.md` can point users to.
94+
Language:
95+
enum:
96+
- JAVA
97+
- PYTHON
98+
- GO
99+
- RUBY
100+
- CSHARP
101+
- TYPESCRIPT

.mock/fern.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"organization" : "fern",
3-
"version" : "0.0.23"
3+
"version" : "0.57.0"
44
}

.mock/generators.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)