{"id":3033,"date":"2017-03-23T12:05:10","date_gmt":"2017-03-23T19:05:10","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=3033"},"modified":"2023-06-19T03:13:06","modified_gmt":"2023-06-19T10:13:06","slug":"fakeit-series-3-5-lean-models-through-definitions","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/","title":{"rendered":"FakeIt Series 3 of 5: Lean Models through Definitions"},"content":{"rendered":"<p>Aaron Benton is an experienced architect who specializes in creative solutions to develop innovative mobile applications. He has over 10 years experience in full stack development, including ColdFusion, SQL, NoSQL, JavaScript, HTML, and CSS. Aaron is currently an Applications Architect for Shop.com in Greensboro, North Carolina and is a <a href=\"https:\/\/developer.couchbase.com\/experts-and-champions\">Couchbase Community Champion<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2974\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg\" alt=\"Aaron Benton\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-150x150.jpg 150w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-768x768.jpg 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-65x65.jpg 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-50x50.jpg 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000-20x20.jpg 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/03\/aaronb-benton-headshot_1000x1000.jpg 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2><strong>FakeIt Series 3 of 5: Lean Models through Definitions<\/strong><\/h2>\n<p>In our previous post <a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-shared-data-dependencies\/\">FakeIt Series 2 of 5<\/a>: Shared Data and Dependencies\u00a0we saw how to create multi-model dependencies with FakeIt. Today we are going to look at how we can create the same, but smaller models by leveraging definitions.<\/p>\n<p>Definitions are a way of creating reusable set(s) within your model. It allows you to define a set of properties \/ values one time, referencing them multiple times throughout your model. Definitions in a FakeIt model are very similar to how definitions are used in the <u><a href=\"https:\/\/swagger.io\/specification\/\" target=\"_blank\" rel=\"noopener noreferrer\">Swagger<\/a><\/u>\u00a0\/ <u><a href=\"https:\/\/github.com\/OAI\/OpenAPI-Specification\" target=\"_blank\" rel=\"noopener noreferrer\">Open API Specification<\/a><\/u>.<\/p>\n<h3><strong>Users Model<\/strong><\/h3>\n<p>We will start with our users.yaml\u00a0model that we defined in our <u><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\" target=\"_blank\" rel=\"noopener noreferrer\">first post<\/a><\/u>.<\/p>\n<pre class=\"lang:default decode:true \">name:\u00a0Users\r\ntype:\u00a0object\r\nkey:\u00a0_id\r\nproperties:\r\n\u00a0 _id:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The document id built by the prefix \"user_\"\u00a0and the users id\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 post_build:\u00a0`user_${this.user_id}`\r\n\u00a0 doc_type:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The document type\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 value:\u00a0user\r\n\u00a0 user_id:\r\n\u00a0 \u00a0 type:\u00a0integer\r\n\u00a0 \u00a0 description:\u00a0An auto-incrementing number\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0document_index\r\n\u00a0 first_name:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users first name\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.name.firstName()\r\n\u00a0 last_name:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users last name\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.name.lastName()\r\n\u00a0 username:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The username\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.internet.userName()\r\n\u00a0 password:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users password\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.internet.password()\r\n\u00a0 email_address:\r\n\u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 description:\u00a0The users email address\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0faker.internet.email()\r\n\u00a0 created_on:\r\n\u00a0 \u00a0 type:\u00a0integer\r\n\u00a0 \u00a0 description:\u00a0An epoch time of when the user was created\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 build:\u00a0new Date(faker.date.past()).getTime()<\/pre>\n<p>Lets say that we have a new requirement where we have to support a home and work address for each user. Based on this requirement, we have decided to create a top-level property named addresses\u00a0that will contain nested properties of home\u00a0and work.<\/p>\n<pre class=\"lang:default decode:true \">{\r\n\u00a0 \u00a0...\r\n\u00a0 \u00a0\"addresses\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0\"home\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"address_1\": \"123 Broadway St\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"address_2\": \"Apt. C\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"locality\": \"Greensboro\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"region\": \"NC\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"postal_code\": \"27409\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"country\": \"US\"\r\n\u00a0 \u00a0 \u00a0 \u00a0},\r\n\u00a0 \u00a0 \u00a0 \u00a0\"work\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"address_1\": \"321 Morningside Ave\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"address_2\": \"\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"locality\": \"Greensboro\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"region\": \"NC\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"postal_code\": \"27409\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"country\": \"US\"\r\n\u00a0 \u00a0 \u00a0 \u00a0}\r\n\u00a0 \u00a0}\r\n}\r\n\r\n<\/pre>\n<p>Our users.yaml\u00a0model will need to be updated to support these new address properties.<\/p>\n<p><em>(For brevity the other properties have been left off of the model definition)<\/em><\/p>\n<pre class=\"lang:default decode:true \">...\r\nproperties:\r\n\u00a0...\r\n\u00a0 addresses:\r\n\u00a0 \u00a0 type:\u00a0object\r\n\u00a0 \u00a0 description:\u00a0An object containing the home and work addresses for the user\r\n\u00a0 \u00a0 properties:\r\n\u00a0 \u00a0 \u00a0 home:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0object\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The users home address\r\n\u00a0 \u00a0 \u00a0 \u00a0 properties:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 address_1:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The address 1\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0`${faker.address.streetAddress()} ${faker.address.streetSuffix()}`\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 address_2:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The address 2\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0chance.bool({ likelihood: 35\u00a0}) ? faker.address.secondaryAddress() : null\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 locality:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The city \/ locality\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.city()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 region:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The region \/ state \/ province\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.stateAbbr()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 postal_code:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The zip code \/ postal code\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.zipCode()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 country:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The country code\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.countryCode()\r\n\u00a0 \u00a0 \u00a0 work:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0object\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The users home address\r\n\u00a0 \u00a0 \u00a0 \u00a0 properties:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 address_1:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The address 1\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0`${faker.address.streetAddress()} ${faker.address.streetSuffix()}`\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 address_2:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The address 2\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0chance.bool({ likelihood: 35\u00a0}) ? faker.address.secondaryAddress() : null\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 locality:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The city \/ locality\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.city()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 region:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The region \/ state \/ province\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.stateAbbr()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 postal_code:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The zip code \/ postal code\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.zipCode()\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 country:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The country code\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.countryCode()<\/pre>\n<p>As you can see our home and work address properties contain the exact same nested properties. This duplication makes our model bigger and more verbose. Additionally, what happens if our address requirements need to change? We&#8217;d have to make two updates to keep the structure the same. This is where we can take advantage of definitions, by defining a single way to create an address and reference it.<\/p>\n<p><em>(For brevity the other properties have been left off of the model definition)<\/em><\/p>\n<pre class=\"lang:default decode:true \">...\r\nproperties:\r\n\u00a0...\r\n\u00a0 addresses:\r\n\u00a0 \u00a0 type:\u00a0object\r\n\u00a0 \u00a0 description:\u00a0An object containing the home and work addresses for the user\r\n\u00a0 \u00a0 properties:\r\n\u00a0 \u00a0 \u00a0 home:\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The users home address\r\n\u00a0 \u00a0 \u00a0 \u00a0 schema:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0$ref: '#\/definitions\/Address'\r\n\u00a0 \u00a0 \u00a0 work:\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The users work address\r\n\u00a0 \u00a0 \u00a0 \u00a0 schema:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0$ref: '#\/definitions\/Address'\r\ndefinitions:\r\n\u00a0 Address:\r\n\u00a0 \u00a0 type:\u00a0object\r\n\u00a0 \u00a0 properties:\r\n\u00a0 \u00a0 \u00a0 address_1:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The address 1\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0`${faker.address.streetAddress()} ${faker.address.streetSuffix()}`\r\n\u00a0 \u00a0 \u00a0 address_2:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The address 2\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0chance.bool({ likelihood: 35\u00a0}) ? faker.address.secondaryAddress() : null\r\n\u00a0 \u00a0 \u00a0 locality:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The city \/ locality\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.city()\r\n\u00a0 \u00a0 \u00a0 region:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The region \/ state \/ province\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.stateAbbr()\r\n\u00a0 \u00a0 \u00a0 postal_code:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The zip code \/ postal code\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.zipCode()\r\n\u00a0 \u00a0 \u00a0 country:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The country code\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.address.countryCode()<\/pre>\n<p>Definitions are defined at the root of the model by specifying a definitions:\u00a0property, then the name of the definition. Definitions are referenced by using $ref\u00a0with the value being the path to the definition, for example #\/definitions\/Address. By using definitions we have saved almost 30 lines of code in our model and created a single place for how an Address is to be defined and generated within our Users model.<\/p>\n<p>We can test the output of our updated Users model addresses using the following command:<\/p>\n<pre class=\"lang:default decode:true \">fakeit console --count 1 models\/users.yaml\r\n\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5693 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog3-example1-compressor.gif\" alt=\"\" width=\"800\" height=\"443\" \/><\/p>\n<p>Now, lets say we have a requirement to store a Users main phone number, and then store optional additional phone numbers i.e. Home, Work, Mobile, Fax, etc. For this change we will use two new top-level properties: main_phone\u00a0and additional_phones\u00a0that is an array.<\/p>\n<pre class=\"lang:default decode:true \">{\r\n\u00a0 \u00a0...\r\n\u00a0 \u00a0\"main_phone\": {\r\n\u00a0 \u00a0 \u00a0 \u00a0\"phone_number\": \"7852322322\",\r\n\u00a0 \u00a0 \u00a0 \u00a0\"extension\": null\r\n\u00a0 \u00a0},\r\n\u00a0 \u00a0\"additional_phones\": [\r\n\u00a0 \u00a0 \u00a0 \u00a0{\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"phone_number\": \"3368232032\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"extension\": \"3233\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"type\": \"Work\"\r\n\u00a0 \u00a0 \u00a0 \u00a0},\r\n\u00a0 \u00a0 \u00a0 \u00a0{\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"phone_number\": \"4075922921\",\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"extension\": null,\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"type\": \"Mobile\"\r\n\u00a0 \u00a0 \u00a0 \u00a0}\r\n\u00a0 \u00a0]\r\n}\r\n\r\n<\/pre>\n<p>While this may not be the most practical data model, or how I personally would have modeled this data we can use this example again to illustrate how we can take advantage of using definitions within our FakeIt model.<\/p>\n<p><em>(For brevity the other properties have been left off of the model definition)<\/em><\/p>\n<pre class=\"lang:default decode:true\">...\r\nproperties:\r\n\u00a0...\r\n\u00a0 main_phone:\r\n\u00a0 \u00a0 description:\u00a0The users main phone number\r\n\u00a0 \u00a0 schema:\r\n\u00a0 \u00a0 \u00a0$ref: '#\/definitions\/Phone'\r\n\u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 post_build:\u00a0|\r\n\u00a0 \u00a0 \u00a0 \u00a0delete this.main_phone.type\r\n\u00a0 \u00a0 \u00a0 \u00a0return this.main_phone\r\n\u00a0 additional_phones:\r\n\u00a0 \u00a0 type:\u00a0array\r\n\u00a0 \u00a0 description:\u00a0The users additional phone numbers\r\n\u00a0 \u00a0 items:\r\n\u00a0 \u00a0 \u00a0$ref: '#\/definitions\/Phone'\r\n\u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 min:\u00a01\r\n\u00a0 \u00a0 \u00a0 \u00a0 max:\u00a04\r\ndefinitions:\r\n\u00a0 Phone:\r\n\u00a0 \u00a0 type:\u00a0object\r\n\u00a0 \u00a0 properties:\r\n\u00a0 \u00a0 \u00a0 type:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The phone type\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.random.arrayElement([ 'Home', 'Work', 'Mobile', 'Other'\u00a0])\r\n\u00a0 \u00a0 \u00a0 phone_number:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The phone number\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0faker.phone.phoneNumber().replace(\/[^0-9]+\/g, '')\r\n\u00a0 \u00a0 \u00a0 extension:\r\n\u00a0 \u00a0 \u00a0 \u00a0 type:\u00a0string\r\n\u00a0 \u00a0 \u00a0 \u00a0 description:\u00a0The phone extension\r\n\u00a0 \u00a0 \u00a0 \u00a0 data:\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 build:\u00a0chance.bool({ likelihood: 30\u00a0}) ? chance.integer({ min: 1000, max: 9999\u00a0}) : null<\/pre>\n<p>For this example we have created a Phone definition that contains 3 properties: type, phone_number and extension. You will notice that we have defined a post_build\u00a0function on the main_phone\u00a0property that removes the type attribute. This is illustrating how definitions can be used in conjunction with a build function to manipulate what is returned by the definition. The additional_phones\u00a0property is an array of Phone definitions that will generate between 1 &#8211; 4 phones. We can test the output of our updated Users model phone numbers using the following command:<\/p>\n<pre class=\"lang:default decode:true \">fakeit console --count 1 models\/users.yaml\r\n\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-5691 size-full\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/blog3-example2-compressor.gif\" alt=\"\" width=\"800\" height=\"443\" \/><\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>Definitions allow you to streamline your FakeIt models by creating reusable sets of code for smaller more efficient models.<\/p>\n<h4><strong>Up Next<\/strong><\/h4>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-working-existing-data\/\">FakeIt Series 4 of 5: Working with Existing Data<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-5-5-rapid-mobile-development-sync-gateway\/\">FakeIt Series 5 of 5: Rapid Mobile Development w\/ Sync-Gateway<\/a><\/li>\n<\/ul>\n<h4><strong>Previous<\/strong><\/h4>\n<ul>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-generating-fake-data\/\">FakeIt Series 1 of 5: Generating Fake Data<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-shared-data-dependencies\/\">FakeIt Series 2 of 5: Shared Data and Dependencies<\/a><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2966 aligncenter\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/brand.devCommChampionLogo.champion.FINAL_-300x300.png\" alt=\"Couchbase Champion\" width=\"300\" height=\"300\" \/>\u00a0<a href=\"https:\/\/www.couchbase.com\/community\/community-writers-program\/\"><em>This post is part of the Couchbase Community Writing Program<\/em><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Definitions are a way of creating reusable set(s) within your model. It allows you to define a set of properties \/ values one time, referencing them multiple times throughout your model. Definitions in a FakeIt model are very similar to how definitions are used in the Swagger \/ Open API Specification.<\/p>\n","protected":false},"author":53,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816,1819],"tags":[1883,1884],"ppma_author":[9026],"class_list":["post-3033","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","category-data-modeling","tag-data-modelling","tag-document-patterns"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FakeIt Series 3 of 5: Lean Models through Definitions<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FakeIt Series 3 of 5: Lean Models through Definitions\" \/>\n<meta property=\"og:description\" content=\"Definitions are a way of creating reusable set(s) within your model. It allows you to define a set of properties \/ values one time, referencing them multiple times throughout your model. Definitions in a FakeIt model are very similar to how definitions are used in the Swagger \/ Open API Specification.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-23T19:05:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-19T10:13:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg\" \/>\n<meta name=\"author\" content=\"Laura Czajkowski, Developer Community Manager, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Laura Czajkowski, Developer Community Manager, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\"},\"author\":{\"name\":\"Laura Czajkowski, Developer Community Manager, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220\"},\"headline\":\"FakeIt Series 3 of 5: Lean Models through Definitions\",\"datePublished\":\"2017-03-23T19:05:10+00:00\",\"dateModified\":\"2023-06-19T10:13:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\"},\"wordCount\":664,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"data modelling\",\"document patterns\"],\"articleSection\":[\"Couchbase Server\",\"Data Modeling\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\",\"name\":\"FakeIt Series 3 of 5: Lean Models through Definitions\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-03-23T19:05:10+00:00\",\"dateModified\":\"2023-06-19T10:13:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FakeIt Series 3 of 5: Lean Models through Definitions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220\",\"name\":\"Laura Czajkowski, Developer Community Manager, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9deb07d5daaa00220534c31768bc4409\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g\",\"caption\":\"Laura Czajkowski, Developer Community Manager, Couchbase\"},\"description\":\"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter.\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/laura-czajkowski\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"FakeIt Series 3 of 5: Lean Models through Definitions","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/","og_locale":"en_US","og_type":"article","og_title":"FakeIt Series 3 of 5: Lean Models through Definitions","og_description":"Definitions are a way of creating reusable set(s) within your model. It allows you to define a set of properties \/ values one time, referencing them multiple times throughout your model. Definitions in a FakeIt model are very similar to how definitions are used in the Swagger \/ Open API Specification.","og_url":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-03-23T19:05:10+00:00","article_modified_time":"2023-06-19T10:13:06+00:00","og_image":[{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/03\/aaronb-benton-headshot_1000x1000-300x300.jpg","type":"","width":"","height":""}],"author":"Laura Czajkowski, Developer Community Manager, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Laura Czajkowski, Developer Community Manager, Couchbase","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/"},"author":{"name":"Laura Czajkowski, Developer Community Manager, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220"},"headline":"FakeIt Series 3 of 5: Lean Models through Definitions","datePublished":"2017-03-23T19:05:10+00:00","dateModified":"2023-06-19T10:13:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/"},"wordCount":664,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["data modelling","document patterns"],"articleSection":["Couchbase Server","Data Modeling"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/","url":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/","name":"FakeIt Series 3 of 5: Lean Models through Definitions","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2017-03-23T19:05:10+00:00","dateModified":"2023-06-19T10:13:06+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/fakeit-series-3-5-lean-models-through-definitions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FakeIt Series 3 of 5: Lean Models through Definitions"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/5f1a0ece4e644bc8c037686fbc8f3220","name":"Laura Czajkowski, Developer Community Manager, Couchbase","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/9deb07d5daaa00220534c31768bc4409","url":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","caption":"Laura Czajkowski, Developer Community Manager, Couchbase"},"description":"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter.","url":"https:\/\/www.couchbase.com\/blog\/author\/laura-czajkowski\/"}]}},"authors":[{"term_id":9026,"user_id":53,"is_guest":0,"slug":"laura-czajkowski","display_name":"Laura Czajkowski, Developer Community Manager, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bc8eebaf25cbe39bc12fd7b1ef92550becc3953ab877a3f0285a59ec2d30b754?s=96&d=mm&r=g","author_category":"","last_name":"Czajkowski","first_name":"Laura","job_title":"","user_url":"","description":"Laura Czajkowski is the Snr. Developer Community Manager at Couchbase overseeing the community. She\u2019s responsible for our monthly developer newsletter."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/3033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=3033"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/3033\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=3033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=3033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=3033"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=3033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}