From 346929ed56be370186df64460ba48fe8ad33e42b Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 13 Nov 2024 14:59:08 +0800 Subject: [PATCH] http-client-java, add a basic readme (#5064) Add a very basic readme. I've omitted the emitter option part. Had it proofread by copilot. I think it should appear on npm package page, if http-client-java get released to npm. --- packages/http-client-java/README.md | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/packages/http-client-java/README.md b/packages/http-client-java/README.md index e69de29bb2..b5b9debf4a 100644 --- a/packages/http-client-java/README.md +++ b/packages/http-client-java/README.md @@ -0,0 +1,31 @@ +# TypeSpec Java Emitter Library + +This is a TypeSpec library that will emit a Java SDK from TypeSpec. + +## Prerequisite + +Install [Node.js](https://nodejs.org/) 20 or above. (Verify by running `node --version`) + +Install [Java](https://docs.microsoft.com/java/openjdk/download) 11 or above. (Verify by running `java --version`) + +## Getting started + +### Initialize TypeSpec Project + +Follow the [TypeSpec Getting Started](https://typespec.io/docs/) 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 --emit @typespec/http-client-java` + +e.g. + +```cmd +npx tsp compile main.tsp --emit @typespec/http-client-java +```