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
9
9
10
10
generate : # # Generate the output spec
11
11
@echo " >> generating the spec .."
12
+ @make generate-language-examples
12
13
@npm run generate-schema --prefix compiler -- --spec ../specification/ --output ../output/
13
14
@npm run start --prefix typescript-generator
14
15
@@ -53,7 +54,6 @@ transform-expand-generics: ## Create a new schema with all generics expanded
53
54
@npm run transform-expand-generics --prefix compiler
54
55
55
56
transform-to-openapi : # # Generate the OpenAPI definition from the compiled schema
56
- @make generate-language-examples
57
57
@npm run transform-to-openapi -- --schema output/schema/schema.json --flavor stack --output output/openapi/elasticsearch-openapi.json
58
58
@npm run transform-to-openapi -- --schema output/schema/schema.json --flavor serverless --output output/openapi/elasticsearch-serverless-openapi.json
59
59
Original file line number Diff line number Diff line change 15
15
// specific language governing permissions and limitations
16
16
// under the License.
17
17
18
+ use std:: collections:: HashMap ;
18
19
use std:: fmt:: { Debug , Display , Formatter } ;
19
20
20
21
use anyhow:: anyhow;
@@ -498,6 +499,7 @@ pub struct SchemaExample {
498
499
pub description : Option < String > ,
499
500
pub value : Option < String > ,
500
501
pub external_value : Option < String > ,
502
+ pub alternatives : Option < HashMap < String , String > > ,
501
503
}
502
504
503
505
/// Common attributes for all type definitions
Original file line number Diff line number Diff line change @@ -277,6 +277,8 @@ export class Example {
277
277
value ?: string
278
278
/** A URI that points to the literal example */
279
279
external_value ?: string
280
+ /** A map of alternatives for this example in other languages */
281
+ alternatives : Record < string , string >
280
282
}
281
283
282
284
/**
You can’t perform that action at this time.
0 commit comments