Skip to content

Repository files navigation

Kiota TypeSpec emitter

npm version License: MIT Build and Test

Welcome to the BinkyLabs Kiota TypeSpec emitter. This emitter allows you to generate client code for your APIs defined via TypeSpec using kiota.

Installation

Global installation

npm i -g @binkylabs/kiota-typespec-emitter

Local install

npm i -D @binkylabs/kiota-typespec-emitter

Usage

In your tspconfig.yaml file, add the following section

emit:
  - @binkylabs/kiota-typespec-emitter
options:
  "@binkylabs/kiota-typespec-emitter":
    clients:
      csharp:
        output-path: "someOutputPath"
        client-class-name: "WidgetClient"
        client-namespace-name: "DemoService.Client"
        #...

You MAY emit up to one client per definition per language. The options are the same as the generate command (except for the OpenAPI description and the log level which are provided automatically). After generating the client code, you'll need to add the required dependencies more information.

Important! This emitter downloads the kiota binaries (~40MB) upon first run, make sure you're connected to internet.

About

A TypeSpec emitter that uses kiota to emit clients for REST APIs

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages