Skip to content

Commit

Permalink
feat(go): Publish @fern-api/dynamic-ir-sdk (#5059)
Browse files Browse the repository at this point in the history
  • Loading branch information
amckinney authored Oct 31, 2024
1 parent ecdcfe0 commit ee0e082
Show file tree
Hide file tree
Showing 88 changed files with 2,368 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ir-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ jobs:
cd packages/ir-sdk
version=$(cat fern/apis/ir-types-latest/VERSION)
fern generate --api ir-types-latest --group node --version $version
dynamic-ir:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api

- name: Release SDKs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }}
run: |
cd packages/ir-sdk
version=$(cat fern/apis/ir-types-latest/VERSION)
fern generate --api ir-types-latest --group dynamic-ir --version $version
python:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion packages/ir-sdk/fern/apis/ir-types-latest/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
53.15.0
53.16.0
12 changes: 8 additions & 4 deletions packages/ir-sdk/fern/apis/ir-types-latest/definition/api.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: ir
docs: |
- Add `float` primitive type.
- Add a `PrimitiveTypeV2` variant for every `PrimitiveTypeV1`.
- Add gRPC/Protobuf types.
audiences:
- dynamic

# Notes:
# - Add dynamic IR and generator-exec config.
# - Add `float` primitive type.
# - Add a `PrimitiveTypeV2` variant for every `PrimitiveTypeV1`.
# - Add gRPC/Protobuf types.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ imports:
types: ./types.yml
types:
DynamicIntermediateRepresentation:
audiences:
- dynamic
docs: |
This represents the IR required to generate dynamic snippets.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
types:
GeneratorConfig:
audiences:
- dynamic
properties:
dryRun: boolean
irFilepath: string
originalReadmeFilepath: optional<string>
license: optional<LicenseConfig>
output: GeneratorOutputConfig
publish:
type: optional<GeneratorPublishConfig>
docs: Deprecated. Use output.mode instead.
workspaceName: string
organization: string
customConfig: unknown
environment: GeneratorEnvironment
whitelabel: boolean
writeUnitTests: boolean
generatePaginatedClients: optional<boolean>
generateOauthClients: boolean
LicenseConfig:
union:
basic: BasicLicense
custom: CustomLicense
BasicLicense:
properties:
id: LicenseId
LicenseId:
enum:
- MIT
- name: apache2
value: Apache-2.0
CustomLicense:
properties:
filename: string
GeneratorOutputConfig:
properties:
path: string
snippetFilepath: optional<string>
snippetTemplateFilepath: optional<string>
publishingMetadata: optional<PublishingMetadata>
mode: OutputMode
OutputMode:
union:
publish: GeneratorPublishConfig
downloadFiles: {}
github: GithubOutputMode
GeneratorPublishConfig:
properties:
registries:
type: GeneratorRegistriesConfig
docs: Deprecated, use publishTargets instead.
registriesV2:
type: GeneratorRegistriesConfigV2
docs: Deprecated, use publishTargets instead.
publishTarget: optional<GeneratorPublishTarget>
version: string
GithubOutputMode:
properties:
version: string
repoUrl:
type: string
docs: A full repo url (i.e. https://github.com/fern-api/fern)
installationToken:
type: optional<string>
docs: |
The token scoped to installing the repository. If not specified, the generator
should NOT attempt to clone the repository.
publishInfo: optional<GithubPublishInfo>
OutputMetadataAuthor:
properties:
name: string
email: string
OutputMetadata:
properties:
description: optional<string>
authors: optional<list<OutputMetadataAuthor>>
PublishingMetadata:
docs: This should effectively be deprecated in favor of a more specific configuration per-output mode (pypi, maven, etc.).
properties:
package_description: optional<string>
publisher_email: optional<string>
reference_url: optional<string>
publisher_name: optional<string>
GithubPublishInfo:
union:
npm: NpmGithubPublishInfo
maven: MavenGithubPublishInfo
postman: PostmanGithubPublishInfo
pypi: PypiGithubPublishInfo
rubygems: RubyGemsGithubPublishInfo
nuget: NugetGithubPublishInfo
EnvironmentVariable: string
NpmGithubPublishInfo:
properties:
registryUrl: string
packageName: string
tokenEnvironmentVariable: EnvironmentVariable
shouldGeneratePublishWorkflow: optional<boolean>
MavenCentralSignatureGithubInfo:
properties:
keyIdEnvironmentVariable: EnvironmentVariable
passwordEnvironmentVariable: EnvironmentVariable
secretKeyEnvironmentVariable: EnvironmentVariable
MavenGithubPublishInfo:
properties:
registryUrl: string
coordinate: string
usernameEnvironmentVariable: EnvironmentVariable
passwordEnvironmentVariable: EnvironmentVariable
signature: optional<MavenCentralSignatureGithubInfo>
shouldGeneratePublishWorkflow: optional<boolean>
PostmanGithubPublishInfo:
properties:
apiKeyEnvironmentVariable: EnvironmentVariable
workspaceIdEnvironmentVariable: EnvironmentVariable
PypiMetadata:
extends: OutputMetadata
properties:
keywords: optional<list<string>>
documentationLink: optional<string>
homepageLink: optional<string>
PypiGithubPublishInfo:
properties:
registryUrl: string
packageName: string
usernameEnvironmentVariable: EnvironmentVariable
passwordEnvironmentVariable: EnvironmentVariable
pypiMetadata: optional<PypiMetadata>
shouldGeneratePublishWorkflow: optional<boolean>
RubyGemsGithubPublishInfo:
properties:
registryUrl: string
packageName: string
apiKeyEnvironmentVariable: EnvironmentVariable
shouldGeneratePublishWorkflow: optional<boolean>
NugetGithubPublishInfo:
properties:
registryUrl: string
packageName: string
apiKeyEnvironmentVariable: EnvironmentVariable
shouldGeneratePublishWorkflow: optional<boolean>
GeneratorRegistriesConfig:
properties:
maven: MavenRegistryConfig
npm: NpmRegistryConfig
MavenCentralSignature:
properties:
keyId: string
password: string
secretKey: string
MavenRegistryConfig:
properties:
registryUrl: string
username: string
password: string
group: string
signature: optional<MavenCentralSignature>
NpmRegistryConfig:
properties:
registryUrl: string
token: string
scope: string
GeneratorRegistriesConfigV2:
properties:
maven: MavenRegistryConfigV2
npm: NpmRegistryConfigV2
pypi: PypiRegistryConfig
rubygems: RubyGemsRegistryConfig
nuget: NugetRegistryConfig
GeneratorPublishTarget:
union:
maven: MavenRegistryConfigV2
npm: NpmRegistryConfigV2
pypi: PypiRegistryConfig
postman: PostmanConfig
rubygems: RubyGemsRegistryConfig
nuget: NugetRegistryConfig
MavenRegistryConfigV2:
properties:
registryUrl: string
username: string
password: string
coordinate: string
signature: optional<MavenCentralSignature>
NpmRegistryConfigV2:
properties:
registryUrl: string
token: string
packageName: string
PypiRegistryConfig:
properties:
registryUrl: string
username: string
password: string
packageName: string
pypiMetadata: optional<PypiMetadata>
RubyGemsRegistryConfig:
properties:
registryUrl: string
apiKey: string
packageName: string
NugetRegistryConfig:
properties:
registryUrl: string
apiKey: string
packageName: string
PostmanConfig:
properties:
apiKey: string
workspaceId: string
GeneratorEnvironment:
discriminant:
value: _type
name: type
union:
local: {}
remote: RemoteGeneratorEnvironment
RemoteGeneratorEnvironment:
properties:
coordinatorUrl: string
coordinatorUrlV2: string
id: string
13 changes: 13 additions & 0 deletions packages/ir-sdk/fern/apis/ir-types-latest/generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ groups:
outputSourceFiles: true
includeUtilsOnUnionMembers: true
noOptionalProperties: true
dynamic-ir:
audiences:
- dynamic
generators:
- name: fernapi/fern-typescript-node-sdk
version: 0.38.6
output:
location: npm
package-name: "@fern-api/dynamic-ir-sdk"
token: ${{NPM_TOKEN}}
config:
noOptionalProperties: true
noSerdeLayer: true
node:
generators:
- name: fernapi/fern-typescript-node-sdk
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ee0e082

Please sign in to comment.