Skip to content

Commit

Permalink
Merge branch 'main' into eden/file-upload-parameter-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eyw520 authored Nov 18, 2024
2 parents 81842ad + a4db33d commit 9b1b588
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
7 changes: 2 additions & 5 deletions fern/pages/changelogs/cli/2024-09-07.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
## 0.41.6

**`(feat):`** The Fern Docs CLI now supports OAuth 2.0 Client Credentials injection in API playgrounds.
To enable this feature, you can define the OAuth Authorization Scheme in your API configuration,
and enable the feature in your docs configuration.

API configuration:

```yml
api:
auth-schemes:
Expand All @@ -15,16 +13,15 @@ api:
get-token:
endpoint: endpoint.authorization
```
[More Information](https://buildwithfern.com/learn/api-definition/fern/authentication#oauth-client-credentials)
Docs configuration:
```yml
navigation:
section: API Reference
playground:
oauth: true
```
[More Information](https://buildwithfern.com/learn/docs/api-references/customize-api-playground)
[More Information](https://buildwithfern.com/learn/docs/api-references/api-playground/advanced-configuration#enabling-oauth-20-authorization-injection)
4 changes: 4 additions & 0 deletions fern/pages/changelogs/cli/2024-11-18.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 0.45.0-rc45
**`(fix):`** The IR handles converting example unions that are aliases.


7 changes: 7 additions & 0 deletions packages/cli/cli/versions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
- changelogEntry:
- summary: |
The IR handles converting example unions that are aliases.
type: fix
irVersion: 53
version: 0.45.0-rc45

- changelogEntry:
- summary: |
Update the IR's `ServiceTypeReferenceInfo` to include all transitive types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from "@fern-api/ir-sdk";
import { FernWorkspace } from "@fern-api/api-workspace-commons";
import {
isRawAliasDefinition,
isRawObjectDefinition,
RawSchemas,
visitRawTypeDeclaration,
Expand Down Expand Up @@ -665,10 +666,19 @@ function convertSingleUnionType({
throw new Error("Example is not an object");
}
const { [discriminant]: _discriminantValue, ...nonDiscriminantPropertiesFromExample } = example;
const rawDeclaration = typeResolver.getDeclarationOfNamedTypeOrThrow({
let rawDeclaration = typeResolver.getDeclarationOfNamedTypeOrThrow({
referenceToNamedType: rawValueType,
file: fileContainingType
});
while (isRawAliasDefinition(rawDeclaration.declaration)) {
rawDeclaration = typeResolver.getDeclarationOfNamedTypeOrThrow({
referenceToNamedType:
typeof rawDeclaration.declaration === "string"
? rawDeclaration.declaration
: rawDeclaration.declaration.type,
file: fileContainingType
});
}
if (!isRawObjectDefinition(rawDeclaration.declaration)) {
throw new Error(`${rawValueType} is not an object`);
}
Expand Down

0 comments on commit 9b1b588

Please sign in to comment.