Join Kevin Bowersox for an in-depth discussion in this video Reusing parameters, part of Building APIs with Swagger and the OpenAPI Specification.
- [Instructor] Query parameters are another object … that can be reused in API definition files. … If we take a look at our API definition, … we'll see, within our product endpoint, … that we have the paging parameters … that we established for the get operation. … These parameters could easily be reused … for other endpoints that require paging. … So let's go ahead and copy these, … because we're going to move them … within the component section to make them reusable. … To do that, we simply add the parameters object … to the component section, … and then we need to provide a name … for each of the parameters that we want to define. … So, in this case, I'm going to … supply a parameter named pageNumber, … and then we're going to grab the YAML … that defines these parameters and paste it in, … and then we simply adjust the indentation … to conform to YAML standards. … And then we'll need to build out our second parameter, … which is going to be the pageSize, … and here we'll, once again, need to do some indentation. …
- 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.