[julia] Emit Project.toml, track OpenAPI.jl release-0.2, fix exportOperations - #24789
Merged
wing328 merged 2 commits intoAug 27, 2026
Merged
Conversation
…erations - Emit a Project.toml with generated clients and servers, pinning OpenAPI = "0.2" so fresh environments do not resolve to the incompatible OpenAPI.jl 1.x. The package UUID is derived deterministically from the package name for reproducible generation. - Point samples-julia.yaml at the release-0.2 maintenance branch of OpenAPI.jl instead of the v0.2.0 tag so samples are tested against the latest 0.2.x fixes. - Fix the exportOperations option in JuliaClientCodegen writing through the exportModels setter and value. - Document the OpenAPI.jl 0.2.x runtime compatibility boundary in generated READMEs. - Remove stale docs/generators/julia.md; the registered generators are julia-client and julia-server, which have their own docs.
4 tasks
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.
Housekeeping for the
julia-client/julia-servergenerators, following the OpenAPI.jl 0.2.x / 1.x split (JuliaComputing/OpenAPI.jl#104).OpenAPI.jl
mainnow hosts a 1.x pure-Julia generator with a different runtime API; the 0.2.x series that these generators target is maintained on therelease-0.2branch. This PR keeps generated code working through that transition and fixes two standing issues:Project.tomlwith the generated code (both generators). Generated modules previously declared no dependencies, so a fresh environment doingPkg.add("OpenAPI")would resolve to OpenAPI.jl 1.x and fail on the missing 0.2.x API (OpenAPI.Clients/OpenAPI.Servers). The emittedProject.tomlnames the package (with a deterministic UUID derived from the package name, so regeneration is reproducible), declares the dependencies the generated code uses (OpenAPI,Dates,TimeZones, plusHTTP/URIsfor the server), and pinsOpenAPI = "0.2".samples-julia.yamlpinned the OpenAPI.jl checkout to thev0.2.0tag (2023), so recent 0.2.x fixes were never exercised against freshly generated samples. It now checks outrelease-0.2.exportOperationsoption inJuliaClientCodegen: it calledsetExportModelsand wrote theexportModelsvalue through to theexportOperationstemplate property, so the two options were not separable.OpenAPI.client/OpenAPI.server).docs/generators/julia.md, which documented ajuliagenerator that is not registered (the registered generators arejulia-clientandjulia-server, which have their own docs).PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
Summary by cubic
Keeps
julia-clientandjulia-servergenerated code working after OpenAPI.jl split into a 1.x pure-Julia generator and a 0.2.x maintenance series that these generators target. Generated modules previously declared no dependencies, so a fresh environment could resolve to the incompatibleOpenAPI1.x; the generators now emit aProject.tomlthat pinsOpenAPI = "0.2"and declaresDates,TimeZones, and (for servers)HTTP/URIs. The package UUID is derived deterministically from the package name so regeneration is reproducible.Bug Fixes
exportOperationsinJuliaClientCodegenwriting through theexportModelssetter and value.release-0.2branch of OpenAPI.jl instead of the stalev0.2.0tag.docs/generators/julia.md, which documented an unregisteredjuliagenerator that duplicatesjulia-client/julia-serverdocs.Written for commit 68cef24. Summary will update on new commits.