This solution instructs you on how to complete the previous challenge, which is important because creating resources is a common capability found on REST APIs and because learning to reuse parts of an API definition is important for not repeating code.
(upbeat music) … - [Instructor] In this video, I'll share my solution … for this challenge. … To get started, I'm going to add a component section … to the bottom of the file. … Within this component section, … I'm going to create a reusable schema object … that represents the article resource. … This component will provide us … with some reusability throughout the API definition, … and we can avoid repeating the article schema object … throughout the file. … To define the properties on the article schema object, … we can go ahead and copy the properties … from the object on our get operation. … So I'm just going to go ahead and copy these fields … and place them within the article schema object … at the bottom of the file. … Once they're in place, … I can go ahead and click on Edit … and then convert to YAML … and the file will automatically format. … Now we can just go ahead and remove those properties … from the API definition underneath the get operation. … We'll still need to specify the type of the objects …
- The architecture of the Swagger ecosystem
- Using the tools within the Swagger platform
- Building a basic API using Swagger
- Defining APIs
- Creating API documentation using Swagger UI
- Creating and publishing APIs with SwaggerHub
- API management with Apigee
- Monitoring API usage
Skill Level Intermediate
HTTP Essential Trainingwith Morten Rand-Hendriksen50m 18s Beginner
1. Swagger Ecosystem
2. Building API Specifications
3. Creating and Publishing APIs with SwaggerHub
4. Capstone Project
Next steps1m 19s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.