Skip to content

Commit f30d79c

Browse files
authored
fix: import attributes, dep bumps (#978)
* chore: fix linting * chore(deps): bump oas-normalize to latest * revert: don't update fixtures * Revert "revert: don't update fixtures" This reverts commit 80bdd44. * feat: add import attributes ts-morph is incredible
1 parent 11594ea commit f30d79c

File tree

46 files changed

+74
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+74
-54
lines changed

package-lock.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"prettier": "@readme/eslint-config/prettier",
3434
"devDependencies": {
3535
"@readme/eslint-config": "^14.0.0",
36-
"@tsconfig/node18": "^18.2.2",
36+
"@tsconfig/node20": "^20.1.4",
3737
"alex": "^11.0.1",
3838
"conventional-changelog-cli": "^5.0.0",
3939
"eslint": "^8.56.0",

packages/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"ajv": "^8.12.0",
8686
"ajv-formats": "^3.0.1",
8787
"fetch-mock": "^11.1.3",
88-
"oas-normalize": "^11.0.1",
88+
"oas-normalize": "^12.0.0",
8989
"openapi-types": "^12.1.3",
9090
"tsup": "^8.0.1",
9191
"tsx": "^4.19.1",

packages/api/src/codegen/languages/typescript/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export default class TSGenerator extends CodeGenerator {
329329
moduleSpecifier: '@readme/api-core/types',
330330
},
331331
{ defaultImport: 'APICore', moduleSpecifier: '@readme/api-core' },
332-
{ defaultImport: 'definition', moduleSpecifier: this.specPath },
332+
{ defaultImport: 'definition', moduleSpecifier: this.specPath, attributes: [{ name: 'type', value: 'json' }] },
333333
]);
334334

335335
this.sdk = sourceFile.addClass({

packages/httpsnippet-client-api/test/__datasets__/alternate-server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SnippetMock } from '../../index.test.js';
22
import type { OASDocument } from 'oas/types';
33

4-
import definition from '@readme/oas-examples/3.0/json/server-variables.json';
4+
import definition from '@readme/oas-examples/3.0/json/server-variables.json' with { type: 'json' };
55

66
const mock: SnippetMock = {
77
har: {

packages/httpsnippet-client-api/test/__datasets__/application-form-encoded/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SnippetMock } from '../../index.test.js';
22
import type { OASDocument } from 'oas/types';
33

4-
import definition from './openapi.json';
4+
import definition from './openapi.json' with { type: 'json' };
55

66
const mock: SnippetMock = {
77
har: {

packages/httpsnippet-client-api/test/__datasets__/application-json/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SnippetMock } from '../../index.test.js';
22
import type { OASDocument } from 'oas/types';
33

4-
import definition from './openapi.json';
4+
import definition from './openapi.json' with { type: 'json' };
55

66
const mock: SnippetMock = {
77
har: {

packages/httpsnippet-client-api/test/__datasets__/auth-apikey-cookie/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SnippetMock } from '../../index.test.js';
22
import type { OASDocument } from 'oas/types';
33

4-
import definition from '@readme/oas-examples/3.0/json/security.json';
4+
import definition from '@readme/oas-examples/3.0/json/security.json' with { type: 'json' };
55

66
const mock: SnippetMock = {
77
har: {

packages/httpsnippet-client-api/test/__datasets__/auth-apikey-header/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SnippetMock } from '../../index.test.js';
22
import type { OASDocument } from 'oas/types';
33

4-
import definition from '@readme/oas-examples/3.0/json/security.json';
4+
import definition from '@readme/oas-examples/3.0/json/security.json' with { type: 'json' };
55

66
const mock: SnippetMock = {
77
har: {

packages/httpsnippet-client-api/test/__datasets__/auth-basic-full/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SnippetMock } from '../../index.test.js';
22
import type { OASDocument } from 'oas/types';
33

4-
import definition from '@readme/oas-examples/3.0/json/readme.json';
4+
import definition from '@readme/oas-examples/3.0/json/readme.json' with { type: 'json' };
55

66
const authKey = 'buster:pug';
77

0 commit comments

Comments
 (0)