-
Notifications
You must be signed in to change notification settings - Fork 229
Add ts support #920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add ts support #920
Changes from all commits
01bba76
8c3ce34
035d6bb
c85d854
f29cf5f
ee06f41
6d7f799
b114f6d
ee2be2d
d4767e5
1053f89
0bebb7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,96 @@ | ||||||||||||||||||||||||||
| 'use strict'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import _ from 'lodash'; | ||||||||||||||||||||||||||
| import type { | ||||||||||||||||||||||||||
| SpecInput, | ||||||||||||||||||||||||||
| FolderInput, | ||||||||||||||||||||||||||
| MultiFileSpecInput, | ||||||||||||||||||||||||||
| Options, | ||||||||||||||||||||||||||
| ValidationResult, | ||||||||||||||||||||||||||
| ConversionCallback, | ||||||||||||||||||||||||||
| MetadataCallback, | ||||||||||||||||||||||||||
| MergeAndValidateCallback, | ||||||||||||||||||||||||||
| OptionsCriteria, | ||||||||||||||||||||||||||
| OptionDefinition, | ||||||||||||||||||||||||||
| OptionsUseMode, | ||||||||||||||||||||||||||
| RootFiles, | ||||||||||||||||||||||||||
| RelatedFiles, | ||||||||||||||||||||||||||
| BundledContent | ||||||||||||||||||||||||||
| } from './types'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| const { MODULE_VERSION } = require('../lib/schemapack.js'); | ||||||||||||||||||||||||||
| const SchemaPack = require('../lib/schemapack.js').SchemaPack; | ||||||||||||||||||||||||||
| const UserError = require('../lib/common/UserError'); | ||||||||||||||||||||||||||
|
Comment on lines
+21
to
+23
|
||||||||||||||||||||||||||
| const { MODULE_VERSION } = require('../lib/schemapack.js'); | |
| const SchemaPack = require('../lib/schemapack.js').SchemaPack; | |
| const UserError = require('../lib/common/UserError'); | |
| const { MODULE_VERSION } = require('./lib/schemapack.js'); | |
| const SchemaPack = require('./lib/schemapack.js').SchemaPack; | |
| const UserError = require('./lib/common/UserError'); |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The require statements use relative paths starting with '../lib/' but these files are now at './lib/' relative to index.ts in the project root. These paths will fail at runtime since the compiled JavaScript will be in the dist directory.
| const { MODULE_VERSION } = require('../lib/schemapack.js'); | |
| const SchemaPack = require('../lib/schemapack.js').SchemaPack; | |
| const UserError = require('../lib/common/UserError'); | |
| const { MODULE_VERSION } = require('./lib/schemapack.js'); | |
| const SchemaPack = require('./lib/schemapack.js').SchemaPack; | |
| const UserError = require('./lib/common/UserError'); |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter type uses intersection with an inline type which is inconsistent with the defined MultiFileSpecInput interface. Consider adding an 'options' field directly to MultiFileSpecInput or creating a separate BundleInput type.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -779,7 +779,7 @@ module.exports = { | |
| schemaCache, | ||
| variableStore, | ||
| true | ||
| ), | ||
| ) | ||
| ); | ||
| } | ||
| } | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to move this ? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| const generateAuthForCollectionFromOpenAPI = require('./helpers/collection/generateAuthForCollectionFromOpenAPI'); | ||
| const utils = require('./utils'); | ||
| const generateAuthForCollectionFromOpenAPI = require('./helpers/collection/generateAuthForCollectionFromOpenAPI.js'); | ||
| const utils = require('./utils.js'); | ||
|
|
||
| const schemaFaker = require('../assets/json-schema-faker'), | ||
| const schemaFaker = require('../../assets/json-schema-faker.js'), | ||
| _ = require('lodash'), | ||
| mergeAllOf = require('json-schema-merge-allof'), | ||
| xmlFaker = require('./xmlSchemaFaker.js'), | ||
| xmlFaker = require('../xmlSchemaFaker.js'), | ||
|
Comment on lines
+2
to
+7
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You wouldn't require extensions for js files |
||
| URLENCODED = 'application/x-www-form-urlencoded', | ||
| { DEFAULT_RESPONSE_CODE_IN_OAS } = require('../lib/common/schemaUtilsCommon.js'), | ||
| { DEFAULT_RESPONSE_CODE_IN_OAS } = require('../../lib/common/schemaUtilsCommon.js'), | ||
| APP_JSON = 'application/json', | ||
| APP_JS = 'application/javascript', | ||
| TEXT_XML = 'text/xml', | ||
|
|
@@ -895,6 +895,7 @@ let QUERYPARAM = 'query', | |
| else if (propValue.properties) { | ||
| let processedProperties = processSchema(propValue); | ||
| propertyDetails.properties = processedProperties.properties; | ||
| // eslint-disable-next-line max-depth | ||
AyushShri marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if (processedProperties.required) { | ||
| propertyDetails.required = processedProperties.required; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.