apicollective / apibuilder

Simple, Comprehensive Tooling for Modern APIs
https://www.apibuilder.io/
MIT License
563 stars 83 forks source link

[Improvement] Apidoc editor #452

Open nemo83 opened 8 years ago

nemo83 commented 8 years ago

Hi,

a nice improvement / new feature would be an editor.

While I was working on a new public api, I cam across:

And the result was: this

Not perfect of course, but it demonstrates it should be possible with relative small effort.

mbryzek commented 8 years ago

agreed!

Note there are a few people now who are using the swagger editor directly - http://editor.swagger.io/ - and uploading the swagger file to apidoc. There would be a bit of work to make sure all of the swagger features are supported on upload (basics are) and then figuring out the more advanced types (eg union types), but for folks looking for an editor this can be a nice approach

nemo83 commented 8 years ago

I'm trying to put a PoC together here: https://github.com/nemo83/apidoc-editor.

Just to add some context.. I'm defining the schema that the json editor at https://github.com/jdorn/json-editor will be able to digest produce an editor.

mbryzek commented 8 years ago

great! let me know if we can help.

curious: why create a swagger json for the apidoc schema itself?

On Mon, Aug 22, 2016 at 6:48 PM, Giovanni Gargiulo <notifications@github.com

wrote:

I'm trying to put a PoC together here: https://github.com/nemo83/ apidoc-editor.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mbryzek/apidoc/issues/452#issuecomment-241574807, or mute the thread https://github.com/notifications/unsubscribe-auth/AADC0yA3zFYV57E7y7HW6O2EMl5TysaGks5qiidIgaJpZM4JpB5N .

nemo83 commented 8 years ago

Not sure I get your question.

in my project the apidocSchema.json file present at the root of the project, is the json schema for apidoc documents. Here is a link to the demo editor that utilises it.

if you copy and paste in the top right textarea an apidoc document of an api and click on the Update Form button, the editor will update with the data.

In the public folder I'm trying to create a nice page that encapsulates the editor so to make it standalone rather than relying on the editor online.... but I'm really bad at html/css/js :-(

nemo83 commented 8 years ago

First, very ugly, draft

https://nemo83.github.io/apidoc-editor/