This content originally appeared on DEV Community and was authored by Aaron Gong
Here is a very short post on using Redoc in VueJS.
Below is a component you can use in any VueJS project. Remember to install redoc
and null
dependencies.
<template>
<h2>Redoc Sample</h2>
<div id="redoc-container"></div>
</template>
<script setup>
// npm install redoc
// npm install null
import * as redoc from 'redoc/bundles/redoc.standalone' // requires null package
import { onMounted } from 'vue'
onMounted(() => {
redoc.init('http://petstore.swagger.io/v2/swagger.json', { "expandResponses": "200,400" }, document.getElementById('redoc-container'))
})
</script>
<style scoped>
</style>
That's all.
This content originally appeared on DEV Community and was authored by Aaron Gong
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.

APA
MLA
Aaron Gong | Sciencx (2025-02-21T00:23:13+00:00) Redoc With VueJS. Retrieved from https://www.scien.cx/2025/02/21/redoc-with-vuejs/
" » Redoc With VueJS." Aaron Gong | Sciencx - Friday February 21, 2025, https://www.scien.cx/2025/02/21/redoc-with-vuejs/
HARVARDAaron Gong | Sciencx Friday February 21, 2025 » Redoc With VueJS., viewed ,<https://www.scien.cx/2025/02/21/redoc-with-vuejs/>
VANCOUVERAaron Gong | Sciencx - » Redoc With VueJS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/21/redoc-with-vuejs/
CHICAGO" » Redoc With VueJS." Aaron Gong | Sciencx - Accessed . https://www.scien.cx/2025/02/21/redoc-with-vuejs/
IEEE" » Redoc With VueJS." Aaron Gong | Sciencx [Online]. Available: https://www.scien.cx/2025/02/21/redoc-with-vuejs/. [Accessed: ]
rf:citation » Redoc With VueJS | Aaron Gong | Sciencx | https://www.scien.cx/2025/02/21/redoc-with-vuejs/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.