Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rambleraptor
Copy link
Member

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 boxes
that apply

  • Enhancement
  • New proposal
  • Migrated from google.aip.dev
  • Chore / Quick Fix

📋 Your checklist for this pull request

Please review the AEP Style and Guidance for
contributing to this repository.

General

💝 Thank you!

@rambleraptor rambleraptor requested a review from a team as a code owner January 1, 2025 23:32
Copy link
Member

@toumorokoshi toumorokoshi left a 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' },
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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?

Copy link
Member

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' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'x-aep-resource-reference': { 'resource': 'Publisher' },
'x-aep-resource-reference': { 'resource': 'publisher' },

same with the others - we use lower kebab case.

aep/general/0004/aep.md.j2 Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants