diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 406105f4..376411b2 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -89,5 +89,5 @@ of Conduct v1.3], which is adapted from the Contributor Covenant (http://contributor-covenant.org), version 2.0 available at http://contributor-covenant.org/version/2/0/code_of_conduct/ -[CNCF Community Code of Conduct v1.3]: +[cncf community code of conduct v1.3]: https://github.com/cncf/foundation/blob/main/code-of-conduct.md diff --git a/aep/general/0004/aep.md.j2 b/aep/general/0004/aep.md.j2 index c706c398..ac5a976a 100644 --- a/aep/general/0004/aep.md.j2 +++ b/aep/general/0004/aep.md.j2 @@ -73,7 +73,8 @@ For OpenAPI 3.0, Resources must be defined in `#components/schemas` and use the "projects/{project}/user-events/{user-event}", "folder/{folder}/user-events/{user-event}", "users/{user}/events/{user-event}" - ] + ], + "parents": ["project", "folder", "user"] } } } @@ -81,6 +82,10 @@ For OpenAPI 3.0, Resources must be defined in `#components/schemas` and use the } ``` +- If the resource has any parents, they must be specified in the parents field +using the singular name of the resource. The resource must be defined with a +`x-aep-resource` annotation. + {% endtabs %} - The `singular` field **must** be the kebab-case singular type name. diff --git a/aep/general/example.oas.yaml b/aep/general/example.oas.yaml index 75f077d4..fcb0a826 100644 --- a/aep/general/example.oas.yaml +++ b/aep/general/example.oas.yaml @@ -354,6 +354,7 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'max_page_size', @@ -411,6 +412,7 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, ], 'responses': @@ -452,6 +454,7 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', @@ -487,6 +490,7 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', @@ -575,6 +579,7 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', @@ -611,12 +616,14 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Book' }, }, { 'name': 'max_page_size', @@ -669,12 +676,14 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Book' }, }, ], 'responses': @@ -721,12 +730,14 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Book' }, }, { 'name': 'book-edition', @@ -764,12 +775,14 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Book' }, }, { 'name': 'book-edition', @@ -801,12 +814,14 @@ 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Publisher' }, }, { 'name': 'book', 'in': 'path', 'required': true, 'schema': { 'type': 'string' }, + 'x-aep-resource-reference': { 'resource': 'Book' }, }, ], 'responses':