Skip to content

Commit 12a4da4

Browse files
client, fix nightly build (#3034)
sync microsoft/typespec#6218
1 parent eb971ec commit 12a4da4

File tree

8 files changed

+72
-2
lines changed

8 files changed

+72
-2
lines changed

core

Submodule core updated 314 files

typespec-extension/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"newLine": "LF",
2222
"outDir": "dist",
2323
"rootDir": ".",
24-
"types": ["node", "mocha"],
24+
"types": ["node"],
2525
"skipLibCheck": true
2626
},
2727
"include": [

typespec-tests/src/main/java/tsptest/flatten/FlattenAsyncClient.java

+2
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public Mono<Response<Void>> sendProjectedNameWithResponse(String id, BinaryData
142142
* dataLong: Long (Optional)
143143
* requiredUser (Required): (recursive schema, see requiredUser above)
144144
* data_float: Double (Optional)
145+
* long: Long (Optional)
145146
* title: String (Required)
146147
* description: String (Optional)
147148
* status: String(NotStarted/InProgress/Completed) (Required)
@@ -358,6 +359,7 @@ public Mono<Void> sendLong(SendLongOptions options) {
358359
.setDataIntOptional(options.getDataIntOptional())
359360
.setDataLong(options.getDataLong())
360361
.setDataFloat(options.getDataFloat())
362+
.setLongProperty(options.getLongParameter())
361363
.setDescription(options.getDescription())
362364
.setDummy(options.getDummy());
363365
BinaryData sendLongRequest = BinaryData.fromObject(sendLongRequestObj);

typespec-tests/src/main/java/tsptest/flatten/FlattenClient.java

+2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public Response<Void> sendProjectedNameWithResponse(String id, BinaryData sendPr
140140
* dataLong: Long (Optional)
141141
* requiredUser (Required): (recursive schema, see requiredUser above)
142142
* data_float: Double (Optional)
143+
* long: Long (Optional)
143144
* title: String (Required)
144145
* description: String (Optional)
145146
* status: String(NotStarted/InProgress/Completed) (Required)
@@ -349,6 +350,7 @@ public void sendLong(SendLongOptions options) {
349350
.setDataIntOptional(options.getDataIntOptional())
350351
.setDataLong(options.getDataLong())
351352
.setDataFloat(options.getDataFloat())
353+
.setLongProperty(options.getLongParameter())
352354
.setDescription(options.getDescription())
353355
.setDummy(options.getDummy());
354356
BinaryData sendLongRequest = BinaryData.fromObject(sendLongRequestObj);

typespec-tests/src/main/java/tsptest/flatten/implementation/FlattenClientImpl.java

+2
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ public Response<Void> sendProjectedNameWithResponse(String id, BinaryData sendPr
446446
* dataLong: Long (Optional)
447447
* requiredUser (Required): (recursive schema, see requiredUser above)
448448
* data_float: Double (Optional)
449+
* long: Long (Optional)
449450
* title: String (Required)
450451
* description: String (Optional)
451452
* status: String(NotStarted/InProgress/Completed) (Required)
@@ -495,6 +496,7 @@ public Mono<Response<Void>> sendLongWithResponseAsync(String name, BinaryData se
495496
* dataLong: Long (Optional)
496497
* requiredUser (Required): (recursive schema, see requiredUser above)
497498
* data_float: Double (Optional)
499+
* long: Long (Optional)
498500
* title: String (Required)
499501
* description: String (Optional)
500502
* status: String(NotStarted/InProgress/Completed) (Required)

typespec-tests/src/main/java/tsptest/flatten/implementation/models/SendLongRequest.java

+33
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ public final class SendLongRequest implements JsonSerializable<SendLongRequest>
6161
@Generated
6262
private Double dataFloat;
6363

64+
/*
65+
* The long property.
66+
*/
67+
@Generated
68+
private Long longProperty;
69+
6470
/*
6571
* The item's title
6672
*/
@@ -227,6 +233,28 @@ public SendLongRequest setDataFloat(Double dataFloat) {
227233
return this;
228234
}
229235

236+
/**
237+
* Get the longProperty property: The long property.
238+
*
239+
* @return the longProperty value.
240+
*/
241+
@Generated
242+
public Long getLongProperty() {
243+
return this.longProperty;
244+
}
245+
246+
/**
247+
* Set the longProperty property: The long property.
248+
*
249+
* @param longProperty the longProperty value to set.
250+
* @return the SendLongRequest object itself.
251+
*/
252+
@Generated
253+
public SendLongRequest setLongProperty(Long longProperty) {
254+
this.longProperty = longProperty;
255+
return this;
256+
}
257+
230258
/**
231259
* Get the title property: The item's title.
232260
*
@@ -318,6 +346,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
318346
jsonWriter.writeNumberField("dataIntOptional", this.dataIntOptional);
319347
jsonWriter.writeNumberField("dataLong", this.dataLong);
320348
jsonWriter.writeNumberField("data_float", this.dataFloat);
349+
jsonWriter.writeNumberField("long", this.longProperty);
321350
jsonWriter.writeStringField("description", this.description);
322351
jsonWriter.writeStringField("_dummy", this.dummy);
323352
return jsonWriter.writeEndObject();
@@ -344,6 +373,7 @@ public static SendLongRequest fromJson(JsonReader jsonReader) throws IOException
344373
Integer dataIntOptional = null;
345374
Long dataLong = null;
346375
Double dataFloat = null;
376+
Long longProperty = null;
347377
String description = null;
348378
String dummy = null;
349379
while (reader.nextToken() != JsonToken.END_OBJECT) {
@@ -368,6 +398,8 @@ public static SendLongRequest fromJson(JsonReader jsonReader) throws IOException
368398
dataLong = reader.getNullable(JsonReader::getLong);
369399
} else if ("data_float".equals(fieldName)) {
370400
dataFloat = reader.getNullable(JsonReader::getDouble);
401+
} else if ("long".equals(fieldName)) {
402+
longProperty = reader.getNullable(JsonReader::getLong);
371403
} else if ("description".equals(fieldName)) {
372404
description = reader.getString();
373405
} else if ("_dummy".equals(fieldName)) {
@@ -382,6 +414,7 @@ public static SendLongRequest fromJson(JsonReader jsonReader) throws IOException
382414
deserializedSendLongRequest.dataIntOptional = dataIntOptional;
383415
deserializedSendLongRequest.dataLong = dataLong;
384416
deserializedSendLongRequest.dataFloat = dataFloat;
417+
deserializedSendLongRequest.longProperty = longProperty;
385418
deserializedSendLongRequest.description = description;
386419
deserializedSendLongRequest.dummy = dummy;
387420

typespec-tests/src/main/java/tsptest/flatten/models/SendLongOptions.java

+28
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ public final class SendLongOptions {
6666
@Generated
6767
private Double dataFloat;
6868

69+
/*
70+
* The long property.
71+
*/
72+
@Generated
73+
private Long longParameter;
74+
6975
/*
7076
* The item's title
7177
*/
@@ -261,6 +267,28 @@ public SendLongOptions setDataFloat(Double dataFloat) {
261267
return this;
262268
}
263269

270+
/**
271+
* Get the longParameter property: The long property.
272+
*
273+
* @return the longParameter value.
274+
*/
275+
@Generated
276+
public Long getLongParameter() {
277+
return this.longParameter;
278+
}
279+
280+
/**
281+
* Set the longParameter property: The long property.
282+
*
283+
* @param longParameter the longParameter value to set.
284+
* @return the SendLongOptions object itself.
285+
*/
286+
@Generated
287+
public SendLongOptions setLongParameter(Long longParameter) {
288+
this.longParameter = longParameter;
289+
return this;
290+
}
291+
264292
/**
265293
* Get the title property: The item's title.
266294
*

typespec-tests/tsp/flatten.tsp

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ alias LongRequest = {
5151
@clientName("dataFloat")
5252
@encodedName("application/json", "data_float")
5353
float?: float64;
54+
55+
// reserved keyword
56+
long?: int64;
5457
};
5558

5659
model User {

0 commit comments

Comments
 (0)