Azure / Azure/azure-openapi-validator

[new rule]: Validate the url in swagger

Open
#368 1 comment 0 reactions 0 assignees View on GitHub
sdk-rule
Dominant language
TypeScript
Stars
53
Forks
57
Avg merge
1d 23h
Merged PRs (30d)
2

Description

### Lint rule description

We downstream autorest.csharp will consume the url in `externalDocs` to generate method comments, e.g., https://github.com/Azure/azure-sdk-for-net/blob/cf65e6c89774de4dce4fe7b7e65f83b303464278/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationAnalysisClient.cs#L395-L396. The value in the `externalDocs.url` will be put into the above comments.

But this link might be invalid. We need a way to validate this.

### Related swagger example

https://github.com/Azure/azure-rest-api-specs/blob/88e7838a09868a51de3894114355c75929847a46/specification/search/data-plane/Microsoft.Azure.Search.Service/preview/2017-11-11-preview/searchservice.json#L105-L107

### Category

Documentation

### Severity level

Error

### Applies to

Management plane API spec, Data plane API spec, RPaaS API spec

### How to fix the violation

Fail the validation.

### What't the impact if breaking the rule

User will click a corrupted link.

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.