Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Vue Enterprise > Lesson 49

Reusing doc snippets

The header documentation we just defined for the DELETE /items/:id endpoint will actually be used by several other endpoints, including POST /items.

We could simply copy and paste those lines, but there's a "DRY" way to do it by using the @apiDefine param.

Let's go to the top of the file and create a new block up here. We'll use the @apiDefine param, after which can provide a unique name. Let's name this "AuthHeader".


Back to course page

Click to load comments...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom