File tree Expand file tree Collapse file tree 4 files changed +5
-1
lines changed
Expand file tree Collapse file tree 4 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ validate-no-cache: ## Validate a given endpoint request or response without loca
99
1010generate : # # Generate the output spec
1111 @echo " >> generating the spec .."
12+ @make generate-language-examples
1213 @npm run generate-schema --prefix compiler -- --spec ../specification/ --output ../output/
1314 @npm run start --prefix typescript-generator
1415
@@ -53,7 +54,6 @@ transform-expand-generics: ## Create a new schema with all generics expanded
5354 @npm run transform-expand-generics --prefix compiler
5455
5556transform-to-openapi : # # Generate the OpenAPI definition from the compiled schema
56- @make generate-language-examples
5757 @npm run transform-to-openapi -- --schema output/schema/schema.json --flavor stack --output output/openapi/elasticsearch-openapi.json
5858 @npm run transform-to-openapi -- --schema output/schema/schema.json --flavor serverless --output output/openapi/elasticsearch-serverless-openapi.json
5959
Original file line number Diff line number Diff line change 1515// specific language governing permissions and limitations
1616// under the License.
1717
18+ use std:: collections:: HashMap ;
1819use std:: fmt:: { Debug , Display , Formatter } ;
1920
2021use anyhow:: anyhow;
@@ -498,6 +499,7 @@ pub struct SchemaExample {
498499 pub description : Option < String > ,
499500 pub value : Option < String > ,
500501 pub external_value : Option < String > ,
502+ pub alternatives : Option < HashMap < String , String > > ,
501503}
502504
503505/// Common attributes for all type definitions
Original file line number Diff line number Diff line change @@ -277,6 +277,8 @@ export class Example {
277277 value ?: string
278278 /** A URI that points to the literal example */
279279 external_value ?: string
280+ /** A map of alternatives for this example in other languages */
281+ alternatives : Record < string , string >
280282}
281283
282284/**
You can’t perform that action at this time.
0 commit comments