Skip to content

Commit

Permalink
Merge branch 'main' into amckinney/openapi-ir-to-fern
Browse files Browse the repository at this point in the history
  • Loading branch information
amckinney committed Dec 1, 2024
2 parents bb1657e + d6a7822 commit f5ba074
Show file tree
Hide file tree
Showing 36 changed files with 14,966 additions and 99,344 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request_target:
branches:
- main
paths:
- 'fern/**'
- 'packages/cli/docs-**'
workflow_dispatch:
inputs:
prNumber:
Expand Down Expand Up @@ -38,10 +41,26 @@ jobs:
echo "$OUTPUT"
URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
echo "Preview URL: $URL"
echo "🌿 Preview your docs: $URL" > preview_url.txt
echo "$URL" > preview_url.txt
- name: Comment URL in PR
uses: thollander/[email protected]
with:
filePath: preview_url.txt
comment_tag: docs-preview-link
- name: Comment or Update URL in PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
COMMENT_TAG="<!-- docs-preview-link -->"
PREVIEW_URL=$(cat preview_url.txt)
# Get existing comments
EXISTING_COMMENT=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
--jq ".[] | select(.body | contains(\"${COMMENT_TAG}\")) | .id")
if [ -z "$EXISTING_COMMENT" ]; then
# No existing comment, create one
gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-f body="${COMMENT_TAG}🌿 Preview your docs: $PREVIEW_URL"
else
# Update existing comment
gh api repos/${{ github.repository }}/issues/comments/$EXISTING_COMMENT \
-X PATCH \
-f body="${COMMENT_TAG}🌿 Preview your docs: $PREVIEW_URL"
fi
4 changes: 4 additions & 0 deletions fern/pages/changelogs/cli/2024-11-29.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.45.1-rc0
**`(fix):`** Generate valid examples using spec validation information; respect `null` entries during example generation.


2 changes: 2 additions & 0 deletions fern/pages/docs/building-your-docs/announcement-banner.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ announcement:
```
Markdown and HTML is supported in the announcement message. You can include links, images, and other formatting. [Custom css](/learn/docs/building-your-docs/custom-css-global-js#custom-css) can be used to customize the style of the announcement.
Another docs change
4 changes: 2 additions & 2 deletions fern/pages/sdks/capabilities/discriminated-unions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Discriminated Unions
description: Fern SDKs include idiomatic support for discriminated unions
---

The SDKs natively support discriminated [unions](../../api-definition/fern/types#unions) for both OpenAPI and Fern APIs.
The SDKs natively support [discriminated unions](../../api-definition/fern/types#discriminated-unions) for both OpenAPI and Fern APIs.

<AccordionGroup>
<Accordion title="Fern Definition">
Expand Down Expand Up @@ -224,4 +224,4 @@ func ComputeArea(shape *Shape) float64 {
```

</Tab>
</Tabs>
</Tabs>
2 changes: 1 addition & 1 deletion fern/pages/welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ layout: overview
hide-toc: true
---

<Note>Our entire docs website (the one you're looking at right now!) is built using Fern. [See the source Markdown.](https://github.com/fern-api/fern/blob/main/fern/pages/welcome.mdx)</Note>
<Note>Our entire docs website (the one you're looking at right now!) is built using Fern. [See the source Markdown.](https://github.com/fern-api/fern/blob/main/fern/pages/welcome.mdx?plain=1)</Note>

## Products

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ export class ExampleTypeFactory {
) {
return undefined;
}
if (Object.is(example, null)) {
return undefined;
}
const result = this.buildExampleHelper({
schema: schema.value,
visitedSchemaIds,
Expand Down
Loading

0 comments on commit f5ba074

Please sign in to comment.