Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Enterprise Vue > Lesson 115

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...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

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

  • RSS
  • |
  • Atom