You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/python-sdk/topics/object_file.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ spec:
64
64
65
65
> Multiple documents in a single YAML file are also supported, each document will be loaded separately. Documents are separated by `---`
66
66
67
-
### Relationship of cardinality One
67
+
### Relationship of cardinality one
68
68
69
69
A relationship of cardinality one can either reference an existing node via its HFID or create a new node if it doesn't exist.
70
70
In the example below, both `site` and `primary_ip` are relationships of cardinality one.
@@ -83,7 +83,7 @@ spec:
83
83
address: "192.168.1.1"
84
84
```
85
85
86
-
### Relationship of cardinality Many
86
+
### Relationship of cardinality many
87
87
88
88
A relationship of cardinality many can reference existing nodes via their HFID or define nested objects.
89
89
@@ -111,7 +111,7 @@ spec:
111
111
- [Breeder] # Existing Node referenced by its HFID in list format
112
112
```
113
113
114
-
#### Nested Objects
114
+
#### Nested objects
115
115
116
116
When defining nested objects, the node will be automatically created if it doesn't exist and if the relationship between the parent object and the nested object exists, it will be automatically inserted.
117
117
For example, in the example below, the `owner` of a `TestingDog` doesn't need to be specified because it will be automatically inserted.
@@ -175,19 +175,19 @@ spec:
175
175
breed: Persian
176
176
```
177
177
178
-
### Support for Metadata
178
+
### Support for metadata
179
179
180
180
Metadata support is planned for future releases. Currently, the Object file does not support metadata on attributes or relationships.
181
181
182
182
## Troubleshooting
183
183
184
-
### Common Issues
184
+
### Common issues
185
185
186
186
1. **Objects not being created**: Ensure that the YAML syntax is correct and that the file follows the required format.
187
187
2. **Dependency errors**: When objects depend on each other, load them in the correct order (dependencies first).
188
188
3. **Validation errors**: Use the `infrahub object validate` command to check for syntax errors before loading.
189
189
190
-
### Best Practices
190
+
### Best practices
191
191
192
192
1. Use Human Friendly IDs (HFIDs) for all objects to ensure consistent referencing.
193
193
2. Keep object files organized by model type or purpose.
0 commit comments