Skip to content

Commit

Permalink
make Api a default export so importer can call it whatever they want (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo authored May 8, 2024
1 parent 1be2cea commit 5789317
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions oxide-api/package-lock.json

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

2 changes: 1 addition & 1 deletion oxide-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oxide/api",
"version": "0.1.0-alpha.5",
"version": "0.1.0-alpha.6",
"description": "TypeScript client for the Oxide API",
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion oxide-api/src/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4175,7 +4175,7 @@ export type ApiListMethods = Pick<
>;

type EmptyObj = Record<string, never>;
export class Api extends HttpClient {
export default class Api extends HttpClient {
methods = {
/**
* Start an OAuth 2.0 Device Authorization Grant
Expand Down
4 changes: 2 additions & 2 deletions oxide-openapi-gen-ts/package-lock.json

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

2 changes: 1 addition & 1 deletion oxide-openapi-gen-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oxide/openapi-gen-ts",
"version": "0.2.0",
"version": "0.2.1",
"description": "OpenAPI client generator used to generate Oxide TypeScript SDK",
"keywords": [
"oxide",
Expand Down
2 changes: 1 addition & 1 deletion oxide-openapi-gen-ts/src/client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function generateApi(spec: OpenAPIV3.Document, destDir: string) {

w("type EmptyObj = Record<string, never>;");

w(`export class Api extends HttpClient {
w(`export default class Api extends HttpClient {
methods = {`);

for (const { conf, opId, method, path } of iterPathConfig(spec.paths)) {
Expand Down

0 comments on commit 5789317

Please sign in to comment.