# Complex Schema

The header section of the internet object document can have single or multiple schema definitions

```ruby
~ $address: {
    street: string, 
    zip:{string, maxLength:5},
    city: string
  }
~ $person: {
    name:string,
    age:int,
    homeAddress?:$address,
    officeAddress?:$address
  }
~ $schema: $person
---
Spiderman, 25, {Queens, 50010, New York}, {Bond Street, 50001, New York}
```

In the above example, the schema definitions are created for reuse to improve the readability of a schema. The schema definition created for address is reused in the `person` schema definition.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.internetobject.org/the-definitions/complex-schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
