8000 [Components] API Documentation · Issue #733 · nuxtlabs/docus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Components] API Documentation #733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
themodernpk opened this issue Dec 19, 2022 · 5 comments
Closed

[Components] API Documentation #733

themodernpk opened this issue Dec 19, 2022 · 5 comments

Comments

@themodernpk
Copy link

Hi Nuxt Team,

I wanted to suggest an API documentation component, similar to:

https://drive.google.com/file/d/1RVZ-UyC5MFtvdTvthWayD1KQgNF29PJi/view

It should have:

  • Tabs: for different languages
  • API URL with HTTP request type
  • Request parameters
  • Response Parameters

It will be very helpful.

Thanks

Copy link
Member
atinux commented Dec 19, 2022

I like this idea, it should not be too hard.

What would be the usage in MDC from your point of view @themodernpk ?

@themodernpk
Copy link
Author
themodernpk commented Dec 19, 2022

@atinux

I imagine like:

::api{url="/users", mehtods="POST,GET"}

  ::curl
	  #Request
	  ```
	 code
	  ```

	  #Response
	  ```
	 code
	  ```
  ::

  ::php
	  #Request
	  ```
	 code
	  ```

	  #Response
	  ```
	  code
	  ```
  ::
  
  ::nuxt
	  #Request
	  ```
	  code
	  ```

	  #Response
	  ```
	  code
	  ```
  ::

::

Copy link
Member
atinux commented Dec 19, 2022

I think it could be simpler:

::api-docs
url: /users
languages: [curl, php, nuxt]
methods: [get,post]
params:
  hello: string
::

But first, does your API has a Swagger or has an Open API specification?

@themodernpk
Copy link
Author

@atinux

The code can vary from language to language, eg: https://drive.google.com/file/d/1nUbbVLkz96dIWJsBFBctsOm9WQBB9WcM/view

Hence, each tab (language) can have a different code (SDK) to call the same API.

In your example, I am not sure how it will handle the scenario described in the video.

@themodernpk
Copy link
Author

Feel free to look at https://stripe.com/docs/api/products/create documentation

@Tahul Tahul changed the title Component Request: API Documentation [Components] API Documentation May 17, 2023
@larbish larbish closed this as completed Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0