Azure / Azure/oav

Generate nextLink doesn't pass format validation

Open
#887 3 comments 0 reactions 1 assignee Claimed by @ankhyk View on GitHub
enhancement P1
Dominant language
TypeScript
Stars
104
Forks
62
Avg merge
2d 12h
Merged PRs (30d)
5

Description

By default, Cadl generates the definition for `nextLink` as follows:

```json
{
"nextLink": {
"type": "string",
"description": "The link to the next page of items",
"format": "uri",
"x-cadl-name": "Rest.ResourceLocation"
}
}
```

But OAV generates it as a regular random string, e.g.:

```json
{
"nextLink": "aaaaaaaaaa"
}
```

What causes `Swagger ModelValidation` to fail with an error:

```
INVALID_FORMAT

Object didn't pass validation for format uri: aaaaaaaaaa
Url: ...
ExampleUrl: ...
```

See https://github.com/Azure/azure-rest-api-specs-pr/pull/9373/checks?check_run_id=9039799056

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.