@mintlify/mojito v1.0.2
Mojito :cocktail:
Mojito is Mintlify's OpenApi Specification gRPC Service.
Summary
Contains a proto
service defnition for an OpenApiSpec repository service and integration testsuites to test the gRPC server and client.
Implementations:
:heavy_check_mark: go server
:heavy_check_mark: go client
:heavy_check_mark: node client
Consuming Mojito
If you just want to consume Mojito from node
, install @mintlify/mojito
.
- Install the package:
yarn install @mintlify/mojito
- Import the client and use the service methods.
The client takes options as a parameter and is Configurable by environment variables or options:
- Token is configurable by the env variable
MOJITO_TOKEN
. - Endpoint is configurable by the env variable
MOJITO_ENDPOINT
.
Option fields override env variables.
import Mojito, { OpenApiSpecResponse } from "@mintlify/mojito";
export const mojitoClient = Mojito.default({
ssl: true,
token: { TOKEN },
host: { HOST },
});
const res: OpenApiSpecResponse[] = [];
// Get an asyncIiterable response stream.
for await (const spec of mojitoClient.getOpenApiSpecs({
values: [
{
subdomain,
},
],
})) {
// Iterate through the responses as they are received.
res.add(spec);
}
Congratulations! You are now consuming mojito :cocktail:
Contributing to Mojito
Check out the Contributing section, if you want to mix some Mojito :herb: :snowflake: :lemon: :gem:
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago