-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(model-ad): add OpenAPI description and API client for Angular (#…
- Loading branch information
1 parent
dffe2f1
commit 2f90fd8
Showing
61 changed files
with
1,750 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": ["../../../.eslintrc.json"], | ||
"ignorePatterns": ["src/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* eslint-disable */ | ||
export default { | ||
displayName: 'model-ad-api-client-angular', | ||
preset: '../../../jest.preset.js', | ||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], | ||
globals: {}, | ||
coverageDirectory: '../../../coverage/libs/model-ad/api-client-angular', | ||
transform: { | ||
'^.+\\.(ts|mjs|js|html)$': [ | ||
'jest-preset-angular', | ||
{ | ||
tsconfig: '<rootDir>/tsconfig.spec.json', | ||
stringifyContentPathRegex: '\\.(html|svg)$', | ||
}, | ||
], | ||
}, | ||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], | ||
snapshotSerializers: [ | ||
'jest-preset-angular/build/serializers/no-ng-attributes', | ||
'jest-preset-angular/build/serializers/ng-snapshot', | ||
'jest-preset-angular/build/serializers/html-comment', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", | ||
"dest": "../../../dist/libs/model-ad/api-client-angular", | ||
"lib": { | ||
"entryFile": "src/index.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "../../../node_modules/@openapitools/openapi-generator-cli/config.schema.json", | ||
"spaces": 2, | ||
"generator-cli": { | ||
"version": "6.1.0", | ||
"generators": { | ||
"api-client-angular": { | ||
"config": "templates/config.yaml", | ||
"generatorName": "typescript-angular", | ||
"inputSpec": "#{cwd}/../api-description/build/openapi.yaml", | ||
"output": "#{cwd}/src/lib/", | ||
"templateDir": "templates", | ||
"additionalProperties": { | ||
"ngVersion": "14.2.11" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@sagebionetworks/model-ad-api-client-angular", | ||
"version": "0.0.1", | ||
"peerDependencies": { | ||
"@angular/common": "^13.2.0", | ||
"@angular/core": "^13.2.0" | ||
}, | ||
"dependencies": { | ||
"tslib": "2.4.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "model-ad-api-client-angular", | ||
"$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "libs/model-ad/api-client-angular/src", | ||
"projectType": "library", | ||
"prefix": "model-ad", | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/angular:ng-packagr-lite", | ||
"outputs": [ | ||
"{workspaceRoot}/dist/libs/model-ad/api-client-angular" | ||
], | ||
"options": { | ||
"project": "libs/model-ad/api-client-angular/ng-package.json" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"tsConfig": "libs/model-ad/api-client-angular/tsconfig.lib.prod.json" | ||
}, | ||
"development": { | ||
"tsConfig": "libs/model-ad/api-client-angular/tsconfig.lib.json" | ||
} | ||
}, | ||
"defaultConfiguration": "production" | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": [ | ||
"{workspaceRoot}/coverage/libs/model-ad/api-client-angular" | ||
], | ||
"options": { | ||
"jestConfig": "libs/model-ad/api-client-angular/jest.config.ts" | ||
} | ||
}, | ||
"lint-fix": { | ||
"executor": "@nx/eslint:lint", | ||
"options": { | ||
"fix": true | ||
} | ||
}, | ||
"generate": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"commands": [ | ||
"rm -fr src/lib/*", | ||
"openapi-generator-cli generate" | ||
], | ||
"cwd": "{projectRoot}", | ||
"parallel": false | ||
}, | ||
"dependsOn": [ | ||
"^build" | ||
] | ||
} | ||
}, | ||
"tags": [ | ||
"language:typescript" | ||
], | ||
"implicitDependencies": [ | ||
"model-ad-api-description" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './lib'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
wwwroot/*.js | ||
node_modules | ||
typings | ||
dist |
23 changes: 23 additions & 0 deletions
23
libs/model-ad/api-client-angular/src/lib/.openapi-generator-ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
18 changes: 18 additions & 0 deletions
18
libs/model-ad/api-client-angular/src/lib/.openapi-generator/FILES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.gitignore | ||
.openapi-generator-ignore | ||
README.md | ||
api.module.ts | ||
api/api.ts | ||
api/gene.service.ts | ||
configuration.ts | ||
encoder.ts | ||
git_push.sh | ||
index.ts | ||
model/basicError.ts | ||
model/gene.ts | ||
model/genesPage.ts | ||
model/genesPageAllOf.ts | ||
model/models.ts | ||
model/pageMetadata.ts | ||
param.ts | ||
variables.ts |
1 change: 1 addition & 0 deletions
1
libs/model-ad/api-client-angular/src/lib/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.1.0 |
Oops, something went wrong.