Skip to content

Files

Latest commit

 

History

History

http-client-java

TypeSpec Java Emitter Library

This is a TypeSpec library that will emit a Java SDK from TypeSpec.

Prerequisite

Install Node.js 20 or above. (Verify by running node --version)

Install Java 17 or above. (Verify by running java --version)

Install Maven. (Verify by running mvn --version)

Getting started

Initialize TypeSpec Project

Follow the TypeSpec Getting Started documentation to initialize your TypeSpec project.

Ensure that npx tsp compile . runs correctly.

Add Java Emitter http-client-java

Run the command npm install @typespec/http-client-java.

Generate Java Client SDK

Run the command npx tsp compile <path-to-typespec-file> --emit @typespec/http-client-java

e.g.

npx tsp compile main.tsp --emit @typespec/http-client-java