Skip to content

Commit 05130f5

Browse files
committed
openapi output
1 parent 408b911 commit 05130f5

File tree

7 files changed

+2536
-4
lines changed

7 files changed

+2536
-4
lines changed

compiler-rs/clients_schema/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ pub struct SchemaExample {
506506
pub value: Option<String>,
507507
pub external_value: Option<String>,
508508
pub alternatives: Option<Vec<ExampleAlternative>>,
509-
pub alternative_java: Option<ExampleAlternative>,
509+
pub alternative_java: Option<Vec<ExampleAlternative>>,
510510
}
511511

512512
/// Common attributes for all type definitions

compiler-rs/clients_schema_to_openapi/src/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ pub fn add_endpoint(
369369
if let Some(alternative_java) = example.alternative_java.clone() {
370370
code_samples.push(serde_json::json!({
371371
"lang": "java",
372-
"source": alternative_java.code.as_str(),
372+
"source": alternative_java[0].code.as_str(),
373373
}));
374374
}
375375
}
Binary file not shown.

compiler/src/model/metamodel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export class Example {
288288
/** An array of alternatives for this example in other languages */
289289
alternatives?: ExampleAlternative[]
290290
/** An array of alternatives for this example specifically for java */
291-
alternative_java?: ExampleAlternative
291+
alternative_java?: ExampleAlternative[]
292292
}
293293

294294
/**

0 commit comments

Comments
 (0)