Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
permissions:
contents: write
pull-requests: write
packages: write

name: Run Release Please
jobs:
Expand All @@ -27,7 +28,8 @@ jobs:
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: latest
registry-url: "https://registry.npmjs.org"
cache: npm
registry-url: 'https://npm.pkg.github.com'
- name: Build Packages
if: ${{ steps.release.outputs.releases_created }}
run: |
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,6 @@ $RECYCLE.BIN/

# End of https://www.toptal.com/developers/gitignore/api/windows,macos,node

.history
.history

.idea
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@openapi-codegen/cli",
"name": "@chatloop/openapi-codegen-cli",
"version": "2.0.2",
"description": "OpenAPI Codegen cli",
"main": "lib/index.js",
Expand All @@ -9,7 +9,7 @@
"openapi-codegen": "lib/cli.js"
},
"repository": {
"url": "https://github.com/fabien0102/openapi-codegen",
"url": "https://github.com/chatloop/openapi-codegen",
"directory": "cli"
},
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions cli/src/core/parseOpenAPISourceFile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OpenAPIObject } from "openapi3-ts";
import { OpenAPIObject } from "openapi3-ts/oas31";

import type { OpenAPISourceFile } from "../types";

Expand All @@ -20,7 +20,7 @@ export const parseOpenAPISourceFile = ({
const schema = format === "yaml" ? YAML.load(text) : JSON.parse(text);

return new Promise((resolve, reject) => {
if (!schema.openapi || !schema.openapi.startsWith("3.0")) {
if (!schema.openapi || !schema.openapi.startsWith("3")) {
swagger2openapi.convertObj(schema, {}, (err, convertedObj) => {
if (err) {
reject(err);
Expand Down
4 changes: 2 additions & 2 deletions cli/src/fixtures/petstore-expanded.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OpenAPIObject } from "openapi3-ts";
import { OpenAPIObject } from "openapi3-ts/oas31";

export const petstore: OpenAPIObject = {
openapi: "3.0.0",
openapi: "3.1.0",
info: {
version: "1.0.0",
title: "Swagger Petstore",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OpenAPIObject } from "openapi3-ts";
import { OpenAPIObject } from "openapi3-ts/oas31";

/**
* OpenAPI source file.
Expand Down
4 changes: 2 additions & 2 deletions cli/src/types/swagger2openapi.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
declare module "swagger2openapi" {
import { OpenAPIObject } from "openapi3-ts";
import { OpenAPIObject } from "openapi3-ts/oas31";
interface ConverObjCallbackData {
openapi: OpenAPIObject;
}
function convertObj(
schema: unknown,
options: {},
callback: (err: Error, data: ConverObjCallbackData) => void
callback: (err: Error, data: ConverObjCallbackData) => void,
): void;
}
Loading