Skip to content

Commit

Permalink
test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed May 17, 2024
1 parent ac35558 commit 8337ee1
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: integration-tests

on:
workflow_dispatch:
# workflow_dispatch:
push:
branches: [main]
pull_request:
# branches: [main]
# pull_request:

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
Expand Down Expand Up @@ -49,6 +49,7 @@ jobs:
- "./tests/Kiota.Builder.IntegrationTests/NoUnderscoresInModel.yaml"
- "./tests/Kiota.Builder.IntegrationTests/ToDoApi.yaml"
- "./tests/Kiota.Builder.IntegrationTests/GeneratesUritemplateHints.yaml"
- "./tests/Kiota.Builder.IntegrationTests/DiscriminatorSample.yaml"
- "oas::petstore"
- "apisguru::twitter.com:current"
- "apisguru::notion.com"
Expand Down
21 changes: 16 additions & 5 deletions it/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,19 @@
}
]
},
"./tests/Kiota.Builder.IntegrationTests/DiscriminatorSample.yaml": {
"MockServerITFolder": "discriminator",
"Suppressions": [
{
"Language": "ruby",
"Rationale": "https://github.com/microsoft/kiota/issues/2484"
},
{
"Language": "typescript",
"Rationale": "https://github.com/microsoft/kiota/issues/4434"
}
]
},
"apisguru::github.com:api.github.com": {
"MockServerITFolder": "gh",
"Suppressions": [
Expand Down Expand Up @@ -329,9 +342,7 @@
]
},
"apisguru::apis.guru": {
"Suppressions": [
],
"IdempotencySuppressions": [
]
"Suppressions": [],
"IdempotencySuppressions": []
}
}
}
51 changes: 51 additions & 0 deletions tests/Kiota.Builder.IntegrationTests/DiscriminatorSample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
openapi: 3.0.0
info:
title: "Discriminator API"
version: "1.0.0"
servers:
- url: https://mytodos.doesnotexist/
paths:
/discriminateme:
post:
description: Return something
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/Component"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Component"
components:
schemas:
Component:
oneOf:
- $ref: "#/components/schemas/Component1"
- $ref: "#/components/schemas/Component2"
discriminator:
propertyName: objectType
mapping:
obj1: "#/components/schemas/Component1"
obj2: "#/components/schemas/Component2"
Component1:
type: object
required:
- objectType
properties:
objectType:
type: string
one:
type: string
Component2:
type: object
required:
- objectType
properties:
objectType:
type: string
two:
type: string

0 comments on commit 8337ee1

Please sign in to comment.