docs: codegen output and packaging-layer design specs#136
Draft
OmarAlJarrah wants to merge 1 commit into
Draft
Conversation
Capture the design for the generator's output and packaging layer as spec docs under docs/codegen/, grounded in the existing sdk-core API. No generator or KotlinPoet code is added; these are design specs only. - strict-structured-output-schema.md: strict JSON-schema encoding rules (all-required + additionalProperties:false + optional-as-nullable-union), with the Tristate collapse and adapter-only derivation. - fail-soft-validator-skeleton.md: design of a reusable fail-soft recursive validator (recursion guard, path-prefixed errors, deterministic definition names). Deferred until codegen exists. - generated-sdk-provenance.md: provenance file (generator version + input-contract hash), format and location, generated output only. - spring-boot-starter.md: per-API Spring Boot starter shape (@ConfigurationProperties, fun interface customizer, @autoConfiguration assembling IoProvider + transport + HttpPipeline), Spring confined to the generated starter module. - README.md: index linking the specs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds design specifications for the output and packaging layer of a future code generator that
will emit per-API SDKs on top of the hand-written
sdk-coretoolkit. These are design docs onlyunder
docs/codegen/— no generator, KotlinPoet, or schema/validation code is introduced, andnothing here ships in
sdk-core. Every code-shaped snippet is labelled as illustrative targetgenerator output, not compiled in this repo.
Each spec is grounded in the real
sdk-coreAPI (Serde,Tristate,RequestBody,Paginator,the
HttpClient/AsyncHttpClientSPIs,HttpPipeline/HttpPipelineBuilder, theIoseam, andthe context chain) so the eventual generator targets the current surface.
Docs added
strict-structured-output-schema.md— strict JSON-schema encoding rules for structuredoutputs: all-required,
additionalProperties:false, optional-as-nullable-union, deterministic$defsnames, and howTristatecollapses tovalue | nullon the wire. Derivation and thehand-rolled subset validator live in a Jackson adapter, never
sdk-core.fail-soft-validator-skeleton.md— design of a reusable fail-soft recursive validator(one-shot recursion guard, path-prefixed error list, early-return verify helper, deterministic
definition names). Deferred: design only, no runtime type added today.
generated-sdk-provenance.md— a provenance file (generator version + normalizedinput-contract hash, plus supporting metadata), its JSON format, and its classpath + source-root
locations. Stamped into generated output only, never the toolkit.
spring-boot-starter.md— per-API Spring Boot starter shape: a@ConfigurationPropertiesclass, a
fun interfacecustomizer, and an@AutoConfigurationwith@Bean @ConditionalOnMissingBeanthat assembles
{IoProvider + transport + HttpPipeline}. Spring deps confined to the generatedstarter module.
README.md— index linking the four specs and listing thesdk-coreanchors they build on.Notes
Docs only — no source, build, or public-API changes.
Closes #66
Closes #67
Closes #68
Closes #69