> For the complete documentation index, see [llms.txt](https://sebloix.gitbook.io/gstore-node/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sebloix.gitbook.io/gstore-node/schema/methods/path.md).

# path()

Getter / Setter for schemas paths.

```javascript
const mySchema = new Schema({ username: {type: String });

// Getter
mySchema.path('name'); // returns { type: String }

// Setter
mySchema.path('email', { type: String, validate: 'isEmail' });

// You can access the schema from a Model
const User = gstore.model('User');

// add new path to the User Schema
User.schema.path('age', { type: Number });
```
