paint-brush
Defining Types: Using allOf in Swagger JSON by@heypran
5,738 reads
5,738 reads

Defining Types: Using allOf in Swagger JSON

by Pran B.2mMay 10th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

AllOf is an array of object definitions that are used for independent validation but together compose a single object. The data provided by the client must be valid against all of the given subschemas - source: Devanath from Pixabay. The allOf keyword is used to extend an already defined type 'AnyArticleSchema', by adding one more property 'articleRank' to it. You may use these in scenarios where you don't want to repeat the whole Schema and existing Schema is already being used in many places.
featured image - Defining Types: Using allOf in Swagger JSON
Pran B. HackerNoon profile picture
Pran B.

Pran B.

@heypran

Curiosity killed the Schrodinger's cat? or did it?

About @heypran
LEARN MORE ABOUT @HEYPRAN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Pran B. HackerNoon profile picture
Pran B.@heypran
Curiosity killed the Schrodinger's cat? or did it?

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite