azure / api-portal Goto Github PK
View Code? Open in Web Editor NEWAPI Portal lets you create and publish a customized site with API documentation, for free and without writing any code.
License: MIT License
API Portal lets you create and publish a customized site with API documentation, for free and without writing any code.
License: MIT License
Currently getting this error when trying to deploy to GitHub Pages:
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout, actions/setup-node, actions/checkout
I have forked and tried to change the contents of .workflow to point to Node 16 but to no avail.
Hi There ,
we would like to categorize our apis by product . For this we are planning to define cards on home and provide a link to a product page for list of apis .
There is a api-specs folder , which is kind of generic for all pages . Is there a way to filter the list for defined page ( i.e product) .
Other issue we observed it , pages we added using admin module , can not be used as hyperlink to cards . It always says oops some thing went wrong .
Appreciate your help with this .
Cheers
We now have 2 versions of the portal code base with some slight differences:
This brings some questions:
Originally posted by gregz1 August 22, 2022
hello,
as indicated here : https://docs.microsoft.com/en-us/azure/api-management/import-soap-api, the Azure developer portal allows to import a WSDL file to make available a Soap API description into the portal.
Could you confirm that is possible with this version ?
I added a valid WSDL xml file in the api-specs folder and it does not seems to work.
best regards
Hello,
I just wanted to test the current main-line but when executing
cd catalog
npm install
npm start
the process dies with the following error:
ERROR in "/Users/XXXX/api-portal/catalog/node_modules/@paperbits/core/publishing/assetPublisher.ts
[tsl] ERROR in "/Users/XXXX/api-portal/catalog/node_modules/@paperbits/core/publishing/assetPublisher.ts(17,38)
TS2339: Property 'getType' does not exist on type 'typeof import("/Users/XXXX/api-portal/catalog/node_modules/@types/mime/index")'.
My system is MacOS
> node --version
v16.4.0
> npn --version
7.19.1
> sw_vers
ProductName: macOS
ProductVersion: 11.4
BuildVersion: 20F71
As the title says - it seems you only support REST/Swagger/OpenAPI for the moment. GraphQL would be a nice extension.
We are currently evaluating using this repo as a "mocked responses only" front end for our API portal by integrating it into a larger capability that includes documentation served from GitHub via (GitHub Pages).
We have also looked at integrating https://github.com/Azure/api-management-developer-portal however that seems to require:
Requiring authentication to be able to view mocked APIs feels onerous.
Also, thus far I haven't been able to get an actual "Try It Out" page to show for this current repo. I can only get the designer up and see that changes are saved to a json file.
Going through the source code for the two repos there seems to be some divergence now and not sure what the direction is going forward.
Could someone please advise if there will soon be more work put into this API-Portal repo and what might come out of it?
When I add a YAML file to the api-specs
folder and then run npm run publish
it results in an error.
Sample OpenAPI file:
openapi: 3.0.0
info:
title: Simple test
version: '1.0'
paths:
/test:
get:
responses:
'204':
description: No response
Error:
Error: Unable to complete publishing. Error: Unable to complete OpenAPI specifications publishing. SyntaxError: Unexpected token o in JSON at position 0
at JSON.parse ()
at OpenApiPublisher.eval (webpack://publisher/./src/publishing/openApiPublisher.ts?:29:46)
at Generator.next ()
at fulfilled (webpack://publisher/./src/publishing/openApiPublisher.ts?:5:58)
at OpenApiPublisher.eval (webpack://publisher/./src/publishing/openApiPublisher.ts?:39:23)
at Generator.next ()
at fulfilled (webpack://publisher/./src/publishing/openApiPublisher.ts?:5:58)
at SitePublisher.eval (webpack://publisher/./node_modules/@paperbits/core/publishing/sitePublisher.ts?:40:23)
at Generator.throw ()
at rejected (webpack://publisher/./node_modules/@paperbits/core/publishing/sitePublisher.ts?:6:65)
It seems to be trying to parse the YAML file as JSON.
Looking at the demo site it takes about 16 seconds to load.
I think theme.js could go on a diet, since a cursory glance shows it's not minified.
There are important files that Microsoft projects should all have that are not present in this repository. A pull request has been opened to add the missing file(s). When the pr is merged this issue will be closed automatically.
Microsoft teams can learn more about this effort and share feedback within the open source guidance available internally.
Installs/deployments no longer seem to be working. They typically complain about apim-developer-portal being missing:
npm ERR! Failed at the [email protected] publish script.
These errors stop any deployments from working, and the deployments are being performed in alignment with the wiki.
The wiki contains "Customize the site" steps ( https://github.com/Azure/API-Portal/wiki ) as follows:
At step 2.b the following warning is returned:
npm WARN [email protected] No repository field.
At step 2.b the following error is returned, and the website refuses to accepted connections:
WARNING in ./node_modules/any-promise/register.js 24:14-37
Critical dependency: the request of a dependency is an expression
@ ./node_modules/any-promise/index.js 1:17-38
@ ./node_modules/koa-router/node_modules/koa-compose/index.js 3:16-38
@ ./node_modules/koa-router/lib/router.js 9:14-36
@ ./node_modules/routing-controllers/esm2015/driver/koa/KoaDriver.js 348:39-60
@ ./node_modules/routing-controllers/esm2015/index.js 2:0-51 83:0-39 83:0-39 114:23-32 121:23-32
@ ./src/startup.host.ts 7:30-60
WARNING in ./node_modules/express/lib/view.js 81:13-25
Critical dependency: the request of a dependency is an expression
@ ./node_modules/express/lib/application.js 22:11-28
@ ./node_modules/express/lib/express.js 18:12-36
@ ./node_modules/express/index.js 11:0-41
@ ./src/startup.host.ts 4:16-34
WARNING in ./node_modules/routing-controllers/esm2015/util/importClassesFromDirectories.js 28:15-28
Critical dependency: the request of a dependency is an expression
@ ./node_modules/routing-controllers/esm2015/index.js 5:0-83 140:34-62 146:34-62 152:35-63
@ ./src/startup.host.ts 7:30-60
3 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
ERROR in ./node_modules/routing-controllers/esm2015/ActionParameterHandler.js 2:0-63
Module not found: Error: Can't resolve 'class-validator' in '/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/routing-controllers/esm2015'
resolve 'class-validator' in '/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/routing-controllers/esm2015'
Parsed request is a module
using description file: /Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/routing-controllers/package.json (relative path: ./esm2015)
resolve as module
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/routing-controllers/esm2015/node_modules doesn't exist or is not a directory
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/routing-controllers/node_modules doesn't exist or is not a directory
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/node_modules doesn't exist or is not a directory
looking for modules in /Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules
single file module
using description file: /Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/package.json (relative path: ./node_modules/class-validator)
no extension
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/class-validator doesn't exist
.ts
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/class-validator.ts doesn't exist
.tsx
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/class-validator.tsx doesn't exist
.js
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/class-validator.js doesn't exist
.jsx
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/class-validator.jsx doesn't exist
/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/class-validator doesn't exist
/Users/mattdawson/Dev/_Github/OAS-API-Examples/node_modules doesn't exist or is not a directory
/Users/mattdawson/Dev/_Github/node_modules doesn't exist or is not a directory
/Users/mattdawson/Dev/node_modules doesn't exist or is not a directory
looking for modules in /Users/mattdawson/node_modules
single file module
No description file found in /Users/mattdawson/node_modules or above
no extension
/Users/mattdawson/node_modules/class-validator doesn't exist
.ts
/Users/mattdawson/node_modules/class-validator.ts doesn't exist
.tsx
/Users/mattdawson/node_modules/class-validator.tsx doesn't exist
.js
/Users/mattdawson/node_modules/class-validator.js doesn't exist
.jsx
/Users/mattdawson/node_modules/class-validator.jsx doesn't exist
/Users/mattdawson/node_modules/class-validator doesn't exist
/Users/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
@ ./node_modules/routing-controllers/esm2015/RoutingControllers.js 1:0-66 20:36-58
@ ./node_modules/routing-controllers/esm2015/index.js 4:0-58 192:8-26
@ ./src/startup.host.ts 7:30-60
webpack 5.70.0 compiled with 1 error and 3 warnings in 13803 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `webpack --config webpack.designer.js && webpack --config webpack.host.js && node ./dist/host/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Similarly the "Advanced deployment options" section on the same page contains the following instructions:
You can also run the publishing step locally and deploy the generated static assets from the /catalog/dist/website folder to the hosting solution of choice instead of GitHub Pages. To run the publishing step, execute the command npm run publish on your local machine.
The npm run publish
command returned the following:
WARNING in ./node_modules/ws/lib/buffer-util.js 103:21-42
Module not found: Error: Can't resolve 'bufferutil' in '/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/ws/lib'
@ ./node_modules/ws/lib/receiver.js 12:42-66
@ ./node_modules/ws/index.js 7:21-46
@ ./node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js 7:18-31
@ ./node_modules/jsdom/lib/jsdom/browser/Window.js 21:22-83
@ ./node_modules/jsdom/lib/api.js 13:25-61
@ ./node_modules/@paperbits/common/publishing/dominoHtmlDocumentProvider.ts 4:16-32
@ ./node_modules/@paperbits/common/publishing/index.ts 27:13-52
@ ./node_modules/@paperbits/core/core.publish.module.ts 11:21-60
@ ./src/startup.publish.ts 7:30-76
WARNING in ./node_modules/ws/lib/validation.js 109:22-47
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/node_modules/ws/lib'
@ ./node_modules/ws/lib/receiver.js 13:43-66
@ ./node_modules/ws/index.js 7:21-46
@ ./node_modules/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js 7:18-31
@ ./node_modules/jsdom/lib/jsdom/browser/Window.js 21:22-83
@ ./node_modules/jsdom/lib/api.js 13:25-61
@ ./node_modules/@paperbits/common/publishing/dominoHtmlDocumentProvider.ts 4:16-32
@ ./node_modules/@paperbits/common/publishing/index.ts 27:13-52
@ ./node_modules/@paperbits/core/core.publish.module.ts 11:21-60
@ ./src/startup.publish.ts 7:30-76
2 warnings have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
ERROR in unable to locate '/Users/mattdawson/Dev/_Github/OAS-API-Examples/catalog/templates/default.json' glob
webpack 5.70.0 compiled with 1 error and 2 warnings in 43251 ms
assets by path assets/monaco-editor/vs/basic-languages/ 423 KiB 75 assets
assets by path assets/monaco-editor/vs/editor/ 3.94 MiB 12 assets
assets by path assets/monaco-editor/vs/language/ 7.1 MiB 8 assets
assets by path styles/ 110 KiB
asset styles/theme.css 72.1 KiB [compared for emit] (name: styles/theme)
+ 4 assets
assets by path ./ 6.06 MiB
asset ./scripts/theme.js 6.06 MiB [compared for emit] (name: scripts/theme)
asset ./styles/theme.js 2.22 KiB [compared for emit] (name: styles/theme)
assets by path assets/monaco-editor/vs/base/ 243 KiB
asset assets/monaco-editor/vs/base/worker/workerMain.js 177 KiB [compared for emit] [from: node_modules/monaco-editor/min/vs/base/worker/workerMain.js] [copied]
asset assets/monaco-editor/vs/base/browser/ui/codicons/codicon/codicon.ttf 66.3 KiB [compared for emit] [from: node_modules/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf] [copied]
asset assets/monaco-editor/vs/loader.js 31.8 KiB [compared for emit] [from: node_modules/monaco-editor/min/vs/loader.js] [copied]
asset page.html 411 bytes [compared for emit] [from: src/themes/website/assets/page.html] [copied]
Entrypoint scripts/theme 6.06 MiB = ./scripts/theme.js
Entrypoint styles/theme 74.3 KiB = styles/theme.css 72.1 KiB ./styles/theme.js 2.22 KiB
orphan modules 76.1 KiB (javascript) 937 bytes (runtime) [orphan] 31 modules
runtime modules 1.52 KiB 7 modules
modules by path ./node_modules/ 4.55 MiB
javascript modules 4.52 MiB 1132 modules
json modules 33.5 KiB
modules by path ./node_modules/entities/ 30 KiB 4 modules
./node_modules/cheerio/package.json 1.55 KiB [built] [code generated]
./node_modules/truncate-html/node_modules/cheerio/package.json 1.78 KiB [built] [code generated]
./node_modules/css-select/lib/procedure.json 126 bytes [built] [code generated]
modules by path ./src/ 337 KiB (javascript) 71.5 KiB (css/mini-extract) 103 modules
readable-stream (ignored) 15 bytes [built] [code generated]
readable-stream (ignored) 15 bytes [built] [code generated]
util (ignored) 15 bytes [built] [code generated]
util (ignored) 15 bytes [built] [code generated]
webpack 5.70.0 compiled successfully in 43243 ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] publish: `webpack --config webpack.publisher.js && node dist/publisher/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] publish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Can you please help?
Looking at this repo briefly (forgive me if I missed something)
If I add a new, valid openApi json (ver. 3.0.1) file to the api-specs folder, the API will be listed on the home page, but will not display operations within: "No operations found".
The three 'sample' json files work and display as expected. What am I missing?
Stack trace:
Unable to process binding "if: function(){return operations }"
Message: Unable to process binding "foreach: function(){return { data:operations,as:'item'} }"
Message: Unable to process binding "attr: function(){return { href:$component.getReferenceUrl(item)} }"
Message: Parameter "operationName" not specified
Currently the setup wiki page for this repo advises:
The portal will be deployed under the URL https://[username].github.io, without a URL path suffix
Can support for publishing to a URL path suffix be added? Currently the code does not operate correctly if published to GitHub Pages with a URL path suffix (the default config after forking the repo). If the user reconfigures the settings to publish as advised by the wiki page, the user is effectively unable to use their GitHub Pages site for any other repositories, limiting the appeal of this project.
Steps to get to this point:
Getting the following error (happens even before steps 5 and 6 above):
Push the commit or tag
/usr/bin/git push origin gh-pages
remote: Permission to QED-DeveloperPortal/API-Portal.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/QED-DeveloperPortal/API-Portal.git/': The requested URL returned error: 403
Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"
Provide CODEOWNERS configuration so that PRs can get automatically assigned, such as #53
Great to see this new project! I am looking forward to the possibilities this might offer.
Here my questions:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.