Skip to content

add server default values to properties in generated OpenAPI #4774

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

Merged
merged 1 commit into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler-rs/clients_schema_to_openapi/src/schemas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ impl<'a> TypesAndComponents<'a> {
data.external_docs = self.convert_external_docs(prop);
data.deprecated = prop.deprecation.is_some();
data.description = self.property_description(prop)?;
data.default = prop.server_default.clone().map(|value| { serde_json::json!(value) });
data.extensions = crate::availability_as_extensions(&prop.availability, &self.config.flavor);
// TODO: prop.aliases as extensions
// TODO: prop.server_default as extension
// TODO: prop.doc_id as extension (new representation of since and stability)
// TODO: prop.es_quirk as extension?
// TODO: prop.codegen_name as extension?
Expand Down
Binary file modified compiler-rs/compiler-wasm-lib/pkg/compiler_wasm_lib_bg.wasm
Binary file not shown.
Loading
Loading