FD-164: Add Resource Proofs API documentation#530
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the API documentation by introducing a comprehensive set of OpenAPI specifications for a new Resource Proofs API. This addition enables users to programmatically create, retrieve, and update proofs for various mailpiece creatives like postcards, letters, and self-mailers, enhancing the platform's capabilities for creative review and management. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request introduces a new API for 'Resource Proofs', enabling the creation, retrieval, and updating of resource proofs for postcards, letters, and self-mailers, along with their corresponding data models and attributes. Review comments suggest two improvements: correcting a missing required 'to' field in the postcard resource proof example within the API documentation to prevent user errors, and simplifying the object property definition in the resource_proof model by removing a redundant single-value enum when a default value is already present.
ccf52b0 to
23aa43b
Compare
| discriminator: | ||
| propertyName: resource_type | ||
| mapping: | ||
| postcard: "#/oneOf/0" |
There was a problem hiding this comment.
I'm not 100% sure if this will work. Looking at the docs
These discriminator mapping values (#/oneOf/0, #/oneOf/1, #/oneOf/2) aren't valid OpenAPI 3.0 $ref paths. When it gets bundled, it looks like they compile to schemas like this ('0', '1', '2'), and I don't believe those are valid, since they need to be $ref's? I think we'd have to give each oneOf variant its own named schema file.
There was a problem hiding this comment.
This looks good, thanks for the screenshot! I didn't test the UI, I was just going off what I noticed in the lob-api-bundled.yml and wasn't sure if it would cause any issues.
|
not a blocker: wondering if we'd like to add tests for resource proofs? It seems like some of the other resources have contract tests. But this might be harder since the |
23aa43b to
4f9753d
Compare
4f9753d to
9a8974b
Compare
Vulnerable Libraries (17)
More info on how to fix Vulnerable Libraries in JavaScript. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |

Fixes #FD-164
Checklist
mainnpm run bundleoutputs nothing suspectnpm run postmanoutputs nothing suspectChanges
Adds complete OpenAPI specification for the Resource Proofs resource, enabling users to create proofs for reviewing mailpiece creatives. The implementation includes:
New Endpoints:
POST /resource_proofs- Create a new resource proofGET /resource_proofs/{res_prf_id}- Retrieve a resource proofPATCH /resource_proofs/{res_prf_id}- Update a resource proof (template_id only)Resource Types Supported:
Schema Features:
oneOfpattern for the three resource typesallOffor reusabilityFiles Added:
resources/resource_proofs/Files Modified:
lob-api-public.yml- Added tag definition, tagGroup reference, and path definitionsdocs/index.html- Auto-generated from updated specAreas of Concern (optional)
resources/resource_proofs/responses/resource_proof.ymlis missingresource_parametersandurlfields (see code review findings)requiredinresource_proof_editable.ymlmay need alignment with how other discriminated schemas handle this constraint