Skip to content

Commit

Permalink
feat: Generating OpenAPI schema (broken)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat authored and mirceanis committed Sep 7, 2020
1 parent 84bbc62 commit e319c41
Show file tree
Hide file tree
Showing 7 changed files with 849 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ key-store.json

.vscode/
node_modules
temp
6 changes: 4 additions & 2 deletions api-extractor-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",

"apiReport": {
"enabled": false
"enabled": true,
"reportFolder": "./report",
"reportTempFolder": "./temp"
},

"docModel": {
"enabled": true,
"apiJsonFilePath": "./tmpapi/<unscopedPackageName>.api.json"
"apiJsonFilePath": "./temp/<unscopedPackageName>.api.json"
},

"dtsRollup": {
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"build": "lerna run build",
"publish": "lerna publish",
"bootstrap": "lerna bootstrap",
"docs": "ts-node ./scripts/generate-docs.ts && api-documenter markdown -i ./tmpapi -o ./docs/api && rm -rf ./tmpapi",
"schemas": "ts-node ./scripts/generate-schemas.ts",
"docs:api": "ts-node ./scripts/generate-docs.ts",
"docs": "yarn docs:api && api-documenter markdown -i ./temp -o ./docs/api && rm -rf ./temp",
"test": "jest --config=jest.json --maxWorkers=2",
"test:watch": "jest --config=jest.json --watch --verbose",
"daf": "./packages/daf-cli/bin/daf.js",
Expand All @@ -27,20 +29,23 @@
"@commitlint/config-conventional": "^8.3.4",
"@microsoft/api-documenter": "^7.8.19",
"@microsoft/api-extractor": "^7.8.15",
"@microsoft/api-extractor-model": "^7.8.12",
"@types/jest": "^25.1.4",
"apollo-server-express": "^2.15.1",
"codecov": "^3.6.5",
"cross-fetch": "^3.0.5",
"husky": "^4.2.3",
"jest": "^25.1.0",
"jest-fetch-mock": "^3.0.3",
"json-schema": "^0.2.5",
"lerna": "^3.20.2",
"lerna-changelog": "^1.0.1",
"prettier": "^1.19.1",
"pretty-quick": "^2.0.1",
"rimraf": "^3.0.2",
"semantic-release": "^17.0.4",
"ts-jest": "^25.2.1",
"ts-json-schema-generator": "^0.70.2",
"ts-node": "^8.6.2",
"typescript": "^3.9.6"
},
Expand Down
28 changes: 27 additions & 1 deletion packages/daf-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,32 @@ export interface IDataStore extends IPluginMethodMap {
dataStoreSaveVerifiablePresentation(args: VerifiablePresentation): Promise<boolean>
}

/**
* Input arguments for {@link IResolveDid.resolveDid}
*
* @public
*/
export interface ResolveDidArgs {
/**
* DID URL
*
* @example
* `did:web:uport.me`
*/
didUrl: string
}

export interface IResolveDid extends IPluginMethodMap {
resolveDid(args: { didUrl: string }): Promise<DIDDocument>
/**
* Resolves DID and returns DID Document
*
* @example
* ```typescript
* const doc = await agent.resolveDid({ didUrl: 'did:web:uport.me' })
* ```
*
* @param args - Input arguments for resolving a DID
* @public
*/
resolveDid(args: ResolveDidArgs): Promise<DIDDocument>
}
Loading

0 comments on commit e319c41

Please sign in to comment.