Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivica Batinic committed May 31, 2023
1 parent 3bdb0fa commit 2fcafb6
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 24 deletions.
12 changes: 6 additions & 6 deletions docs/examples/basic-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export class Dog extends Model {
}
}

Attribute()(Dog, 'breed');
Attribute()(Dog, 'name');
Field()(Dog, 'breed');
Field()(Dog, 'name');
decorate(Dog, {
greet: computed,
});
Expand All @@ -132,10 +132,10 @@ export class Person extends Model {
}
}

Attribute()(Person, 'id');
Attribute()(Person, 'age');
Attribute()(Person, 'name');
Attribute({ toOne: Dog })(Person, 'favoriteDog');
Field()(Person, 'id');
Field()(Person, 'age');
Field()(Person, 'name');
Field({ toOne: Dog })(Person, 'favoriteDog');
decorate(Person, {
greet: computed,
});
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/defining-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class Pet extends Model {
public owner: Person;
}

Attribute()(Pet, 'name');
Attribute({ defaultValue: 0 })(Pet, 'age');
Attribute({ toOne: Person })(Pet, 'owner');
Field()(Pet, 'name');
Field({ defaultValue: 0 })(Pet, 'age');
Field({ toOne: Person })(Pet, 'owner');
```

#### JavaScript
Expand All @@ -69,7 +69,7 @@ class Pet extends Model {
static type = 'pet';
}

Attribute()(Pet, 'name');
Attribute({ defaultValue: 0 })(Pet, 'age');
Attribute({ toOne: Person })(Pet, 'owner');
Field()(Pet, 'name');
Field({ defaultValue: 0 })(Pet, 'age');
Field({ toOne: Person })(Pet, 'owner');
```
12 changes: 12 additions & 0 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"api-reference/collection": {
"title": "Collection"
},
"api-reference/field": {
"title": "Field"
},
"api-reference/lib-utils": {
"title": "Lib utils"
},
Expand Down Expand Up @@ -114,6 +117,9 @@
"migration-guide/breaking-changes": {
"title": "Breaking changes since v1"
},
"migration-guide/codemods": {
"title": "Codemods"
},
"migration-guide/deprecations": {
"title": "Deprecations in v2"
},
Expand Down Expand Up @@ -300,6 +306,9 @@
"version-2.0.0/api-reference/version-2.0.0-collection": {
"title": "Collection"
},
"version-2.0.0/api-reference/version-2.0.0-field": {
"title": "Field"
},
"version-2.0.0/api-reference/version-2.0.0-lib-utils": {
"title": "Lib utils"
},
Expand Down Expand Up @@ -392,6 +401,9 @@
"version-2.0.0/migration-guide/version-2.0.0-breaking-changes": {
"title": "Breaking changes since v1"
},
"version-2.0.0/migration-guide/version-2.0.0-codemods": {
"title": "Codemods"
},
"version-2.0.0/migration-guide/version-2.0.0-deprecations": {
"title": "Deprecations in v2"
},
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"api-reference/model",
"api-reference/view",
"api-reference/attribute",
"api-reference/field",
"api-reference/bucket",
"api-reference/pure-model",
"api-reference/model-utils",
Expand Down
12 changes: 6 additions & 6 deletions website/versioned_docs/version-2.0.0/examples/basic-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export class Dog extends Model {
}
}

Attribute()(Dog, 'breed');
Attribute()(Dog, 'name');
Field()(Dog, 'breed');
Field()(Dog, 'name');
decorate(Dog, {
greet: computed,
});
Expand All @@ -133,10 +133,10 @@ export class Person extends Model {
}
}

Attribute()(Person, 'id');
Attribute()(Person, 'age');
Attribute()(Person, 'name');
Attribute({ toOne: Dog })(Person, 'favoriteDog');
Field()(Person, 'id');
Field()(Person, 'age');
Field()(Person, 'name');
Field({ toOne: Dog })(Person, 'favoriteDog');
decorate(Person, {
greet: computed,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ class Pet extends Model {
public owner: Person;
}

Attribute()(Pet, 'name');
Attribute({ defaultValue: 0 })(Pet, 'age');
Attribute({ toOne: Person })(Pet, 'owner');
Field()(Pet, 'name');
Field({ defaultValue: 0 })(Pet, 'age');
Field({ toOne: Person })(Pet, 'owner');
```

#### JavaScript
Expand All @@ -70,7 +70,7 @@ class Pet extends Model {
static type = 'pet';
}

Attribute()(Pet, 'name');
Attribute({ defaultValue: 0 })(Pet, 'age');
Attribute({ toOne: Person })(Pet, 'owner');
Field()(Pet, 'name');
Field({ defaultValue: 0 })(Pet, 'age');
Field({ toOne: Person })(Pet, 'owner');
```
1 change: 1 addition & 0 deletions website/versioned_sidebars/version-2.0.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"version-2.0.0-api-reference/model",
"version-2.0.0-api-reference/view",
"version-2.0.0-api-reference/attribute",
"version-2.0.0-api-reference/field",
"version-2.0.0-api-reference/bucket",
"version-2.0.0-api-reference/pure-model",
"version-2.0.0-api-reference/model-utils",
Expand Down

0 comments on commit 2fcafb6

Please sign in to comment.