mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Switched to NPM
This commit is contained in:
parent
6f5d0e4fe9
commit
ec2c712901
@ -12,20 +12,20 @@ jobs:
|
||||
- v1-dependencies-
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: yarn install
|
||||
command: npm install
|
||||
- save_cache:
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- run:
|
||||
name: Build library
|
||||
command: yarn run release
|
||||
command: npm run release
|
||||
- run:
|
||||
name: Run unit tests
|
||||
command: yarn run test:coverage
|
||||
command: npm run test:coverage
|
||||
- run:
|
||||
name: Run e2e tests
|
||||
command: yarn run test:e2e
|
||||
command: npm run test:e2e
|
||||
- run:
|
||||
name: Submit to Codecov
|
||||
command: yarn run codecov
|
||||
command: npm run codecov
|
||||
|
||||
@ -22,9 +22,9 @@ https://help.github.com/articles/using-pull-requests
|
||||
|
||||
1. Make your changes in a new git branch: `git checkout -b my-fix-branch master`
|
||||
2. Create your patch or feature
|
||||
3. Ensure the builds work by running: `yarn run build`
|
||||
4. Ensure the tests will pass by running: `yarn run test`
|
||||
5. Ensure the code is formatted by running: `yarn run eslint:fix`
|
||||
3. Ensure the builds work by running: `npm run build`
|
||||
4. Ensure the tests will pass by running: `npm run test`
|
||||
5. Ensure the code is formatted by running: `npm run eslint:fix`
|
||||
6. Commit your changes using a descriptive commit message
|
||||
|
||||
After your Pull Request is created, it will automatically be build using Circle CI.
|
||||
|
||||
28325
package-lock.json
generated
Normal file
28325
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@
|
||||
"test:e2e": "jest --selectProjects E2E --runInBand --verbose",
|
||||
"eslint": "eslint .",
|
||||
"eslint:fix": "eslint . --fix",
|
||||
"prepublishOnly": "yarn run clean && yarn run release",
|
||||
"prepublishOnly": "npm run clean && npm run release",
|
||||
"codecov": "codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export const escapeName = (value: string): string => {
|
||||
if (value) {
|
||||
if (value || value === '') {
|
||||
const validName = /^[a-zA-Z_$][\w$]+$/g.test(value);
|
||||
if (!validName) {
|
||||
return `'${value}'`;
|
||||
|
||||
@ -7,14 +7,14 @@ const generate = async (input, output) => {
|
||||
await OpenAPI.generate({
|
||||
input,
|
||||
output,
|
||||
httpClient: OpenAPI.HttpClient.FETCH,
|
||||
httpClient: OpenAPI.HttpClient.ANGULAR,
|
||||
useOptions: true,
|
||||
useUnionTypes: false,
|
||||
exportCore: true,
|
||||
exportSchemas: true,
|
||||
exportModels: true,
|
||||
exportServices: true,
|
||||
// clientName: 'Demo',
|
||||
clientName: 'Demo',
|
||||
// indent: OpenAPI.Indent.SPACE_2,
|
||||
// postfix: 'Service',
|
||||
// request: './test/custom/request.ts',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user