mermade / openapi-gui Goto Github PK
View Code? Open in Web Editor NEWGUI / visual editor for creating and editing OpenAPI / Swagger definitions
Home Page: https://mermade.github.io/openapi-gui/
License: MIT License
GUI / visual editor for creating and editing OpenAPI / Swagger definitions
Home Page: https://mermade.github.io/openapi-gui/
License: MIT License
This is either a usability issue or a documentation issue...
Is there no way to leverage a defined Schema as a Request Body? I'm hoping that there is and that I've missed it. If there isn't a way to do this now, it seems like a pretty solid feature to add as it would save a ton of time vs creating new objects in the Schema Editor (uffda, that editor is brutal to use).
btw, I really dig what you're doing here. I've been a swagger user for years, and have always wanted a GUI to create the json vs the other way around.
Currently, when I access https://mermade.github.io/openapi-gui/
with the default definition, the Main
tab show empty page. While other tab like schemas/header/upload/tags works without problem.
This is a great tool and thanks for your work. And I got some usability issue, if anything misunderstand, please correct me. Thanks!
After create a new operation with default value, then create a new response. There are some issues:
Uncaught ReferenceError: duplicateResponse is not defined
at click (eval at Tn (vue.min.js:6), <anonymous>:3:14340)
at e (vue.min.js:6)
at HTMLAnchorElement.t._withTask.t._withTask (vue.min.js:6)
All these issues can reproduce on online editor https://mermade.github.io/openapi-gui/#
When I import my .json file here: https://mermade.github.io/openapi-gui/ and switch to the "Main" tab, all the operations are that far "stretched" that no one can't read them because they are outside the window.
Now that we have an npm module (thanks @yogendra) and potentially a docker container, maybe it makes sense to add swagger2openapi
to the node_modules
so conversions and validations can be done by the in-built webserver/backend without having to call out to and depend on apps deployed to heroku or appspot , which might not always be available.
Questions:
openapi-webconverter
?file://
or a simple server like github pages?The issue is the navigation when click on any option under operation will navigate all operations tab to selected options
Thanks for the cool tool.
I don't quite understand the documentation.
Is it possible to use open-api as external dependency to edit my swagger/openapi definition files (YAML or JSON)?
This problem can be reproduced by adding a new response status code in path operation. When you add a new one after a default 200 code, it increments (201, 202...). Then, I change the incremented value (eg 201 to 401) and add a description. After that, status code changes back to incremented 201, and when i change it back and save, it is still 201 in the resulting json/yaml.
Code-generation options is a good idea. To add to Wizards tab when swagger-codegen supports OpenAPI3 - in progress.
At the moment this issue is just here to try and help people find the project.
Loving the openapi-gui so far and would like to use it, but some of my schemas have recursive references at the child level and at the grandchild level. This causes callstack errors in Chrome and "too many recursion" errors in Firefox when clicking a schemas edit icon.
Any chance you can add in child schema tracking to detect recursion and render recursive schema children, grandchildren, etc... with a placeholder like they do in redoc?
Thanks!
Duplicating paths results into duplicating operation urls when editing (same id's with duplicated operations or something?). Steps to produce:
I removed the info
section in the import box and imported the spec. The import was successful (according to the popup modal), but when I reloaded the page it just turned blank and the console contained errors. Also, the console had TypeError: openapi.info is undefined
right after importing.
Steps to reproduce:
info
and/or servers
section from the JSON box in the Upload
tabLoad Definition
The problem seems to be that the uploaded definitions aren't properly validated and/or fixed.
In Firefox and Chrome
There is an issue with the default description logic on creation and handling if the operation doesn't have a description. Method.js line 122 needs this info.
Hey Guys,
this should be pretty easy to fix:
I was working on a project from scratch, exporting it as json (download).
After some changes, the import failed, because the file didn't specify "openapi": "3.0.0"
, so this seems to be missing in the exporter or I was doing things wrong
Edit: The same problem happens when trying to validate the schemas using the Wizards, so even though my file now has an "openapi" directive, the exporter is swallowing it thus making the validation fail
Maybe useful for dev.smart-api.info/openapi-gui
When the number of schemas rises it would be useful to have the name of the schema in the editor.
As you may know, we currently host a copy of openapi-gui on our SmartAPI project: http://smart-api.info/openapi-gui/. Thanks for making it available.
SmartAPI defines a set of OpenAPI extensions to support biomedical-field APIs, so we are wondering how much work is needed in order to add the extra "x-" extension fields into the openapi-gui web forms.
Ideally, it would be nice to allow us to define extra schemas in a separate file like "extensions.js" (under openapi-gui/data folder), then it can be merged into "jsonSchemaDraft4" defined in "static.js". Depending on how the rendering code works, those extra extension fields can then be rendered in the web forms.
Problem:
Nothing happens on button click
How to reproduce:
docker run -dit -p8080:3000 mermade/openapi-gui
Error in log:
VM725:3 Uncaught ReferenceError: settings is not defined
at click (eval at Tn (vue.min.js:6), <anonymous>:3:430)
at e (vue.min.js:6)
at HTMLAnchorElement.t._withTask.t._withTask (vue.min.js:6)
click @ VM725:3
e @ vue.min.js:6
t._withTask.t._withTask @ vue.min.js:6
Tested on:
Google Chrome Version 73.0.3683.86 (Official Build) (64-bit) with no extensions on Linux and Windows
I see #32 talks about the same thing but for me it seems glitched.
All the other options change the form fields, but the http one does nothing. If I save one with http, you cannot edit it.
I guess I can just add this manually its fine.
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT
We should not host the thirdparty / vendor code in there but use npm to put them there or create a bundle (using webpack or rollup).
Issue:
OpenAPI-GUI automatically creates empty info -> license
and paths -> [/path] -> externalDocs
fields, which are invalid per the OpenAPI 3.0 specs. The license
object requires a name
field, and externalDocs
requires a url
field.
Steps to reproduce:
Load a .yaml file with no license field nor externalDocs field but with paths. Save file.
Expected behavior:
Don't create these fields if they don't already exist. 😄
项目很不错,建议使用element界面组件库加上数据库来开发,
国内有个sosoapi,界面还可以,不过是Java开发的.
https://github.com/apinf/openapi-designer
As per apinf/openapi-designer#85
For example:
localStorage
/ indexedDB
It is always application/json
instead of for example application/x-www-form-urlencoded
.
The https://openapi-gui.herokuapp.com/ has an 'Application Error'.
I really like this editor, however, I have found an issue, it does not save schema edits in the schema editor.
Using Chrome and Firefox:
After reviewing the Json export, I do not see any of my changes. Appreciate the help in solving this issue.
The version available at https://mermade.github.io/openapi-gui/ is horribly buggy.
You cannot edit a just-created schema.
Proof:
Open https://mermade.github.io/openapi-gui/ go to Schemas, click + to add a new one, give it a name, then click on the edit icon and see it break.
You cannot create a Request body for new operations. Just try to create a new path and for that create an operation and try to add a request body.
Other elements might be buggy too, I didn't bother testing them.
Just try it out for yourself. I tested it with Firefox and Chrome.
Cheers!
"parameters": [
{
"name": "status",
"in": "query",
"description": "Status values that need to be considered for filter",
"required": true,
"explode": true,
"schema": {
"type": "array",
"items": {
"type": "string",
"enum": [
"available",
"pending",
"sold"
],
"default": "available"
}
}
},
{
"name": "newParam",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"type": "array",
"items": {
"schema": {
"type": "string"
},
"type": "string",
"default": "newValue2",
"enum": [
"newValue1",
"newValue2"
]
}
}
The issue is the 'Callbacks' at 'Request Body' under Main > Path > Operation unable to config Operation because when trying to navigate to any tab of callback's operation, the screen will go to selected options under path's operation not the callback's operation
Steps to reproduce:
Expected result:
Both enum
and default
should sit under schema.
Thanks for the great tools @MikeRalphson , let me know if you need anything else from me
I had to add "babel-runtime" to the dependencies in package.json to get this to run.
Otherwise it would throw:
Error: Cannot find module 'babel-runtime/core-js/json/stringify'
I'm using:
E.g. a license picker as per apicur.io or at least a link to https://choosealicense.com/
I have an OpenAPI 2.0 document that defines default media types
schemes:
- https
consumes:
- application/hal+json
- application/json
produces:
- application/hal+json
- application/json
The default produces
media type is used for the in-line 2xx responses.
However, for operations that use $ref
for a response, openapi-gui thinks the response does not have a media type, despite the default produces
.
responses:
'201':
description: Created
schema:
$ref: '#/definitions/blahblahblah'
'400':
$ref: '#/responses/400'
and later
responses:
'400':
description: >-
Bad Request.
The request body or one or more of the query parameters was not well
formed. The `_error` field in the response will contain details about the
request error.
schema:
$ref: '#/definitions/errorResponse'
I'm using openapi-gui "version": "1.2.2",
Hi,
The Heroku app has been offline at least for a couple of days:
Reproducing steps:
Thanks!
Good day!
Does OpenAPI-GUI have keywords support?
I was trying to use a keyword 'allOf', but it doesn't seem to work.
As far as I understood allOf takes an array of object definitions that are used for independent validation but together compose a single object(https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not).
There is now the openapi-generator, which appears to have take over swagger-codegen for openapi 3.0, could mermade support it for server and client SDK generation?
theres no security related data at paths operations?
There does not seem to be a mechanism to define Bearer Authentication using JWT as documented here:
https://swagger.io/docs/specification/authentication/bearer-authentication/
Or am I missing something obvious?
As a side effect of the last few commits, the upload option (along with most of the option bar) has disappeared. This seems to have happened literally in the last few minutes, as of the time of this posting.
Using Firefox on Linux, if it matters.
Version: latest at time of writing.
Browser: Chrome latest at time of writing.
Screen: 24" screen
Cannot edit a schema unless there are enough schema's already in the list.
Requires a min. of 5 schema before you can edit the contents properly.
Taking the flexbox and overflow hidden off seems to fix it (there is a js error thought too though, don't know if this is related):
Thank you for the amazing projects :) I and my team so appreciate on this.
I found some of the issues on this while I played around on this and would like to contribute on this to make it better.
The issue is the 'media type' at 'Request Body' under Main > Path > Operation does not reflect the edited value when switching to Export JSON/YAML tab
When opened, the Schemas
page is entirely blank. This issue was not present a few days ago, and appears to have been introduced in the last several commits.
Hi,
Great project, thank you! 😄
Apologies if I'm being slow... is there a way to easily shuffle the order of paths at all in the Main tab?
Or have them re-order alphabetically, send to top/bottom or something?
But thanks again, great stuff.
Tim
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.