Skip to content

Commit

Permalink
fix some typos in plain date and plain time scenarios (#641)
Browse files Browse the repository at this point in the history
* fix some typos in plain date and plain time scenarios

* Create mean-grapes-serve.md
  • Loading branch information
ArcturusZhang authored Jul 18, 2024
1 parent 7069361 commit dd1b849
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .changeset/mean-grapes-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/cadl-ranch-specs": patch
---

fix some typos in plain date and plain time scenarios
32 changes: 16 additions & 16 deletions packages/cadl-ranch-specs/cadl-ranch-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -6443,79 +6443,79 @@ Expected request body:
{}
```

### Type_Property_Optional_Plaindate_getAll
### Type_Property_Optional_PlainDate_getAll

- Endpoint: `get /type/property/optional/plaindate/all`
- Endpoint: `get /type/property/optional/plainDate/all`

Expected response body:

```json
{ "property": "2022-12-12" }
```

### Type_Property_Optional_Plaindate_getDefault
### Type_Property_Optional_PlainDate_getDefault

- Endpoint: `get /type/property/optional/plaindate/default`
- Endpoint: `get /type/property/optional/plainDate/default`

Expected response body:

```json
{}
```

### Type_Property_Optional_Plaindate_putAll
### Type_Property_Optional_PlainDate_putAll

- Endpoint: `put /type/property/optional/plaindate/all`
- Endpoint: `put /type/property/optional/plainDate/all`

Expected request body:

```json
{ "property": "2022-12-12" }
```

### Type_Property_Optional_Plaindate_putDefault
### Type_Property_Optional_PlainDate_putDefault

- Endpoint: `put /type/property/optional/plaindate/default`
- Endpoint: `put /type/property/optional/plainDate/default`

Expected request body:

```json
{}
```

### Type_Property_Optional_Plaintime_getAll
### Type_Property_Optional_PlainTime_getAll

- Endpoint: `get /type/property/optional/plaintime/all`
- Endpoint: `get /type/property/optional/plainTime/all`

Expected response body:

```json
{ "property": "13:06:12" }
```

### Type_Property_Optional_Plaintime_getDefault
### Type_Property_Optional_PlainTime_getDefault

- Endpoint: `get /type/property/optional/plaintime/default`
- Endpoint: `get /type/property/optional/plainTime/default`

Expected response body:

```json
{}
```

### Type_Property_Optional_Plaintime_putAll
### Type_Property_Optional_PlainTime_putAll

- Endpoint: `put /type/property/optional/plaintime/all`
- Endpoint: `put /type/property/optional/plainTime/all`

Expected request body:

```json
{ "property": "13:06:12" }
```

### Type_Property_Optional_Plaintime_putDefault
### Type_Property_Optional_PlainTime_putDefault

- Endpoint: `put /type/property/optional/plaintime/default`
- Endpoint: `put /type/property/optional/plainTime/default`

Expected request body:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ model DurationProperty is ModelTemplate<duration>;
@operationGroup
interface Duration extends OperationsTemplate<DurationProperty, "\"P123DT22H14M12.011S\""> {}

// Model with optional plaindate property
@doc("Model with a plaindate property")
model PlaindateProperty is ModelTemplate<plainDate>;
@route("/plaindate")
// Model with optional plainDate property
@doc("Model with a plainDate property")
model PlainDateProperty is ModelTemplate<plainDate>;
@route("/plainDate")
@operationGroup
interface Plaindate extends OperationsTemplate<PlaindateProperty, "\"2022-12-12\""> {}
interface PlainDate extends OperationsTemplate<PlainDateProperty, "\"2022-12-12\""> {}

// Model with optional property
@doc("Model with a plaintime property")
@doc("Model with a plainTime property")
model PlainTimeProperty is ModelTemplate<plainTime>;
@route("/plaintime")
@route("/plainTime")
@operationGroup
interface Plaintime extends OperationsTemplate<PlainTimeProperty, "\"13:06:12\""> {}
interface PlainTime extends OperationsTemplate<PlainTimeProperty, "\"13:06:12\""> {}

// Model with optional collection bytes property
@doc("Model with collection bytes properties")
Expand Down
22 changes: 11 additions & 11 deletions packages/cadl-ranch-specs/http/type/property/optionality/mockapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ Scenarios.Type_Property_Optional_Duration_getDefault = passOnSuccess(durationMoc
Scenarios.Type_Property_Optional_Duration_putAll = passOnSuccess(durationMock.putAll);
Scenarios.Type_Property_Optional_Duration_putDefault = passOnSuccess(durationMock.putDefault);

const plaindateMock = createMockApis("plaindate", "2022-12-12");
Scenarios.Type_Property_Optional_Plaindate_getAll = passOnSuccess(plaindateMock.getAll);
Scenarios.Type_Property_Optional_Plaindate_getDefault = passOnSuccess(plaindateMock.getDefault);
Scenarios.Type_Property_Optional_Plaindate_putAll = passOnSuccess(plaindateMock.putAll);
Scenarios.Type_Property_Optional_Plaindate_putDefault = passOnSuccess(plaindateMock.putDefault);

const plaindatetimeMock = createMockApis("plaintime", "13:06:12");
Scenarios.Type_Property_Optional_Plaintime_getAll = passOnSuccess(plaindatetimeMock.getAll);
Scenarios.Type_Property_Optional_Plaintime_getDefault = passOnSuccess(plaindatetimeMock.getDefault);
Scenarios.Type_Property_Optional_Plaintime_putAll = passOnSuccess(plaindatetimeMock.putAll);
Scenarios.Type_Property_Optional_Plaintime_putDefault = passOnSuccess(plaindatetimeMock.putDefault);
const plainDateMock = createMockApis("plainDate", "2022-12-12");
Scenarios.Type_Property_Optional_PlainDate_getAll = passOnSuccess(plainDateMock.getAll);
Scenarios.Type_Property_Optional_PlainDate_getDefault = passOnSuccess(plainDateMock.getDefault);
Scenarios.Type_Property_Optional_PlainDate_putAll = passOnSuccess(plainDateMock.putAll);
Scenarios.Type_Property_Optional_PlainDate_putDefault = passOnSuccess(plainDateMock.putDefault);

const plainTimeMock = createMockApis("plainTime", "13:06:12");
Scenarios.Type_Property_Optional_PlainTime_getAll = passOnSuccess(plainTimeMock.getAll);
Scenarios.Type_Property_Optional_PlainTime_getDefault = passOnSuccess(plainTimeMock.getDefault);
Scenarios.Type_Property_Optional_PlainTime_putAll = passOnSuccess(plainTimeMock.putAll);
Scenarios.Type_Property_Optional_PlainTime_putDefault = passOnSuccess(plainTimeMock.putDefault);

const collectionsBytesMock = createMockApis("collections/bytes", ["aGVsbG8sIHdvcmxkIQ==", "aGVsbG8sIHdvcmxkIQ=="]);
Scenarios.Type_Property_Optional_CollectionsByte_getAll = passOnSuccess(collectionsBytesMock.getAll);
Expand Down

0 comments on commit dd1b849

Please sign in to comment.