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
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v17
- uses: googleapis/release-please-action@v5
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,5 @@ $RECYCLE.BIN/

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

.history
.history
.vitest/
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,7 @@ the `@openapi-codegen/cli` supports these generator plugins:
generate all schema types for your specification:

```ts
const { schemasFiles } = await generateSchemaTypes(context, {
/* config */
});
const { schemasFiles } = await generateSchemaTypes(context, {/* config */});
```

output: `{namespace}Schemas.ts`
Expand Down
4 changes: 4 additions & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"url": "git+https://github.com/fabien0102/openapi-codegen.git",
"directory": "cli"
},
"homepage": "https://github.com/fabien0102/openapi-codegen/tree/main/cli#readme",
"bugs": {
"url": "https://github.com/fabien0102/openapi-codegen/issues"
},
"bin": {
"openapi-codegen": "dist/cli.mjs"
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"knip": "knip"
},
"devDependencies": {
"@types/node": "^26.6.5",
"@types/node": "^26.6.6",
"all-contributors-cli": "^6.26.1",
"knip": "^6.43.0",
"typescript": "~6.0.2",
"knip": "^6.45.1",
"typescript": "~6.0.3",
"vite": "catalog:",
"vite-plus": "catalog:"
},
Expand Down
8 changes: 2 additions & 6 deletions plugins/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ import {

export default defineConfig({
petstore: {
from: {
/* file, url or github */
},
from: {/* file, url or github */},
outputDir: "./petStore",
to: async (context) => {
const filenamePrefix = "petStore";
Expand Down Expand Up @@ -181,9 +179,7 @@ import {

export default defineConfig({
myAPI: {
from: {
/* file, url or github */
},
from: {/* file, url or github */},
outputDir: "./myAPI",
to: async (context) => {
// Rename `Foo` to `Bar`
Expand Down
4 changes: 4 additions & 0 deletions plugins/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
"url": "git+https://github.com/fabien0102/openapi-codegen.git",
"directory": "plugins/typescript"
},
"homepage": "https://github.com/fabien0102/openapi-codegen/tree/main/plugins/typescript#readme",
"bugs": {
"url": "https://github.com/fabien0102/openapi-codegen/issues"
},
"files": [
"dist",
"README.md"
Expand Down
8 changes: 3 additions & 5 deletions plugins/typescript/src/core/schemaToTypeAliasDeclaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ import { isValidIdentifier } from "../utils/isValidIdentifier.js";
import { getReferenceSchema } from "./getReference.js";

type RemoveIndex<T> = {
[P in keyof T as string extends P
? never
: number extends P
? never
: P]: T[P];
[
P in keyof T as string extends P ? never : number extends P ? never : P
]: T[P];
};

export type OpenAPIComponentType = Extract<
Expand Down
Loading
Loading