-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add resource reference field on paths #256
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! a couple comments.
@@ -354,6 +354,7 @@ | |||
'in': 'path', | |||
'required': true, | |||
'schema': { 'type': 'string' }, | |||
'x-aep-resource-reference': { 'resource': 'Publisher' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these files are autogenerated now. I think you should modify aep-lib-go to add the new field: https://github.com/aep-dev/aep-lib-go/blob/main/pkg/api/openapi.go#L326. Or file an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this file autogenerated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's a PR documenting it! #258. Since I'm sure it'll come up a lot.
@@ -411,6 +412,7 @@ | |||
'in': 'path', | |||
'required': true, | |||
'schema': { 'type': 'string' }, | |||
'x-aep-resource-reference': { 'resource': 'Publisher' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'x-aep-resource-reference': { 'resource': 'Publisher' }, | |
'x-aep-resource-reference': { 'resource': 'publisher' }, |
same with the others - we use lower kebab case.
x-aep-resource
establishes a list of parents. The individual API endpoints do not establish which fields correspond to a parent resource (if any). This could be established through some guessing, but it's better to annotate these fields specifically.This introduces
x-aep-resource-reference
to indicate that a particular field represents a parent resource. This is super useful for the Resource Explorer in particular.🍱 Types of changes
What types of changes does your code introduce to AEP? Put an
x
in the boxesthat apply
📋 Your checklist for this pull request
Please review the AEP Style and Guidance for
contributing to this repository.
General
references AEPs
correctly.
(usually
prettier -w .
)💝 Thank you!