-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix failing, test trailing slash handling behavior
- Loading branch information
Showing
5 changed files
with
213 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
tests/Kiota.Builder.Tests/OpenApiSampleFiles/TrailingSlashSampleYml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
namespace Kiota.Builder.Tests.OpenApiSampleFiles; | ||
|
||
public static class TrailingSlashSampleYml | ||
{ | ||
/** | ||
* An OpenAPI 3.0.0 sample document with trailing slashes on some paths. | ||
*/ | ||
public static readonly string OpenApiYaml = @" | ||
openapi: 3.0.0 | ||
info: | ||
title: Sample API | ||
description: A sample API that uses trailing slashes. | ||
version: 1.0.0 | ||
servers: | ||
- url: https://api.example.com/v1 | ||
paths: | ||
/foo: | ||
get: | ||
summary: Get foo | ||
description: Returns foo. | ||
responses: | ||
'200': | ||
description: foo | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
/foo/: | ||
get: | ||
summary: Get foo slash | ||
description: Returns foo slash. | ||
responses: | ||
'200': | ||
description: foo slash | ||
content: | ||
text/plain: | ||
schema: | ||
type: string | ||
/message/{id}: | ||
get: | ||
summary: Get a Message | ||
description: Returns a single Message object. | ||
parameters: | ||
- name: id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: A Message object | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Message' | ||
/message/{id}/: | ||
get: | ||
summary: Get replies to a Message | ||
description: Returns a list of Message object replies for a Message. | ||
parameters: | ||
- name: id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: A list of Message objects | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Message' | ||
/bucket/{name}/: | ||
get: | ||
summary: List items in a bucket | ||
description: Returns a list of BucketFiles in a bucket. | ||
parameters: | ||
- name: name | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: A list of BucketFile objects | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/BucketFile' | ||
/bucket/{name}/{id}: | ||
get: | ||
summary: Get a bucket item | ||
description: Returns a single BucketFile object. | ||
parameters: | ||
- name: name | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
- name: id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: A BucketFile object | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/BucketFile' | ||
components: | ||
schemas: | ||
Message: | ||
type: object | ||
properties: | ||
Guid: | ||
type: string | ||
required: | ||
- Guid | ||
BucketFile: | ||
type: object | ||
properties: | ||
Guid: | ||
type: string | ||
required: | ||
- Guid"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters