Feat: PEN-0000 Move api-deploy, remove redundant inline schemas - #1
Conversation
|
If it's an internal tool now, then we must publish it via our internal package service i.e. AWS image registry. |
@mcchrish Yeah, possible. I actually started with ECR, but the fork has no AWS secrets available to it and there's no api-deploy ECR repo yet, so nothing could be pushed without an org admin and an infra change first. I went GHCR to unblock the release since it needs no new repo or secrets. We can do a follow up to migrate the images to AWS image registry after aug 12 deadline |
|
Actually it's ok for it to be public for now. The fork is also public. |
fabfuel
left a comment
There was a problem hiding this comment.
Looks good to me.
So far, testing heavily relied on function tests wich actual OpenAPI files in and out.
I would create another pair of files that we run with dedup enabled to keep It consistent.
| platforms: linux/amd64,linux/arm64 | ||
| push: true | ||
| tags: fabfuel/api-deploy:${{ github.ref_name }} | ||
| tags: ghcr.io/packmatic/api-deploy:${{ github.ref_name }} |
There was a problem hiding this comment.
do we need any permissions setup for this?
There was a problem hiding this comment.
It uses packages:write
feat: dedupe external $refs, add removeExamples
API Gateway's import limit is 6 MiB. Every external
$refwas inlined as a full copy at each use site — ~1,100 copies of six shared error schemas — pushing packaging's compiled spec over it.Two opt-in options, both default
false(existing configs compile unchanged):flatten.dedupExternalRefs— resolve each external schema once intocomponents/schemas, reference it internally. API Gateway resolves internal refs.gateway.removeExamples— stripexample/examples.Packaging spec: 6,355,686 B → 3,916,374 B.
Also: moved the fork to Packmatic —
docker.ymlnow publishesghcr.io/packmatic/api-deployon merge todevelop(was Fabian's Docker Hub account), and refreshedtests/openapi/*_target.yml, which had gone stale against api-types 1.11.0 (widerurn.ymlpattern, new error-response fields).Verified lossless: expanding the hoisted refs reproduces the fully-inlined spec with 0 differences. 10 new unit tests. Suite green (17/17).