Skip to content

Commit 6fbcebc

Browse files
feat: adds support for open API 3.1
* Replace OpenApiReference with a proxy reference equivalent * Upgrade OpenApi lib to v2 * Replace type with the corresponding JsonSchemaType enum value * Use OpenApiAny() for extensions and JsonNodes for examples * cleanup usings * chore: updates to the latest preview * fix: wrong type being emitted for singles Signed-off-by: Vincent Biret <[email protected]> * fix: use number instead of integer Signed-off-by: Vincent Biret <[email protected]> * draft: passes reference to the document Signed-off-by: Vincent Biret <[email protected]> * chore: typo fix Signed-off-by: Vincent Biret <[email protected]> * chore: typo fix Signed-off-by: Vincent Biret <[email protected]> * chore: refactor reduces allocs Signed-off-by: Vincent Biret <[email protected]> * chore: typo fix Signed-off-by: Vincent Biret <[email protected]> * feat: draft migrates all path item handler to accept document for lookup * feat: lookup document is being passed to all handlers Signed-off-by: Vincent Biret <[email protected]> * chore: adds defensive programming Signed-off-by: Vincent Biret <[email protected]> * feat; passes document to the remaining parameter references methods Signed-off-by: Vincent Biret <[email protected]> * fix: adds missing document references to all unit tests Signed-off-by: Vincent Biret <[email protected]> * fix: wrong type-format pair Signed-off-by: Vincent Biret <[email protected]> * fix: additional format fixes Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: passes remaining document references where required * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: registers the component schemas for further lookup Signed-off-by: Vincent Biret <[email protected]> * fix: NRT on properties Signed-off-by: Vincent Biret <[email protected]> * fix: NRT on properties Signed-off-by: Vincent Biret <[email protected]> * fix: further NRT issues Signed-off-by: Vincent Biret <[email protected]> * fix: minor json comparison fixes Signed-off-by: Vincent Biret <[email protected]> * chore; first batch of change line breaks removal Signed-off-by: Vincent Biret <[email protected]> * chore: additional batch of json deep equals conversion Signed-off-by: Vincent Biret <[email protected]> * chore: another batch of json node deep equals Signed-off-by: Vincent Biret <[email protected]> * fix: NRT on title lookup Signed-off-by: Vincent Biret <[email protected]> * fix: property lookup for unit test Signed-off-by: Vincent Biret <[email protected]> * fix: tag generation with extensions Signed-off-by: Vincent Biret <[email protected]> * fix: format updates Signed-off-by: Vincent Biret <[email protected]> * chore: code linting Signed-off-by: Vincent Biret <[email protected]> * fix: copy of extensions for schemas Signed-off-by: Vincent Biret <[email protected]> * fix: tag references unit tests Signed-off-by: Vincent Biret <[email protected]> * fix: type/format mismatch in test data * chore: linting Signed-off-by: Vincent Biret <[email protected]> * chore: linting use switch expressions Signed-off-by: Vincent Biret <[email protected]> * fix: regroups example generation logic Signed-off-by: Vincent Biret <[email protected]> * chore: regroups numeric types Signed-off-by: Vincent Biret <[email protected]> * chore: updates basic example oAS v3 Signed-off-by: Vincent Biret <[email protected]> * fix: multiple updates to test file Signed-off-by: Vincent Biret <[email protected]> * chore: additional test file fixes Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: missing example type Signed-off-by: Vincent Biret <[email protected]> * fix: missing query parameters for $count operations Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: updates trip service test file Signed-off-by: Vincent Biret <[email protected]> * fix: adds missing custom parameters for count subsegments Signed-off-by: Vincent Biret <[email protected]> * fix: minor adjustments to basic v2 json sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor ordering changes in sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor adjustments to basic v2 yaml sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor fixes for basic v3 yaml sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor fixes to multiple schema v3 yaml sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor fixes to trip service v3 yaml sample Signed-off-by: Vincent Biret <[email protected]> * chore: removes obsolete member Signed-off-by: Vincent Biret <[email protected]> * fix: missing host document for request body references Signed-off-by: Vincent Biret <[email protected]> * fix: minor updates to multi schema v2 json sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor changes to multi schema v2 yaml sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor fixes in trip service v2 json sample Signed-off-by: Vincent Biret <[email protected]> * fix: minor fixes for trip service v2 yaml sample Signed-off-by: Vincent Biret <[email protected]> * ci: adds a validation workflow for all descriptions Signed-off-by: Vincent Biret <[email protected]> * ci: fix removes extension trimming Signed-off-by: Vincent Biret <[email protected]> * chore: refactors integration tests Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: wrong test name Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: duplicate operation ids on media and cast segments Signed-off-by: Vincent Biret <[email protected]> * chore: adds OAS 3.1 integration tests Signed-off-by: Vincent Biret <[email protected]> * fix: updates to latest components registrations Signed-off-by: Vincent Biret <[email protected]> * chore: updates for async API surface changes * chore: updates 3.1 integration test documents with latest fixes Signed-off-by: Vincent Biret <[email protected]> * chore: bumps to latest oai.net preview * fix: missing references to document Signed-off-by: Vincent Biret <[email protected]> * fix: visibility of methods Signed-off-by: Vincent Biret <[email protected]> * fix: defaults to oas 3.1 Signed-off-by: Vincent Biret <[email protected]> * chore: code linting Signed-off-by: Vincent Biret <[email protected]> * chore: use pattern matching for safer casting Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: missing type for openapi v2 query parameters Signed-off-by: Vincent Biret <[email protected]> * fix: missing parameter information Signed-off-by: Vincent Biret <[email protected]> * fix: switches parameters components model to add Signed-off-by: Vincent Biret <[email protected]> * fix: normalizes request bodies adding pattern Signed-off-by: Vincent Biret <[email protected]> * fix: aligns to add pattern for example, components, security schemes, paths Signed-off-by: Vincent Biret <[email protected]> * fix: updates v2 definitions for missing produces/consumes Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: draft porting to newer proxy implementation design * chore: removes the style from integration test documents * fix: odata query parameter references Signed-off-by: Vincent Biret <[email protected]> * fix: removes style as it's the default value Signed-off-by: Vincent Biret <[email protected]> * fix: more style form cleanup Signed-off-by: Vincent Biret <[email protected]> * chore: linting Signed-off-by: Vincent Biret <[email protected]> * fix: missing security scheme for reference Signed-off-by: Vincent Biret <[email protected]> * fix: adds missing security scheme definitions * fix: nullable information Signed-off-by: Vincent Biret <[email protected]> * ci: fix type test definition Signed-off-by: Vincent Biret <[email protected]> * fix flaky behaviour with error responses Signed-off-by: Vincent Biret <[email protected]> * fix: removal of nullable property Signed-off-by: Vincent Biret <[email protected]> * chore: updates oai.net reference * fix: adds missing type v2 test documents Signed-off-by: Vincent Biret <[email protected]> * Bump oai.net version * chore: linting Signed-off-by: Vincent Biret <[email protected]> * chore: linting * fix: enum example values Signed-off-by: Vincent Biret <[email protected]> --------- Signed-off-by: Vincent Biret <[email protected]> Co-authored-by: Vincent Biret <[email protected]>
1 parent efaf60a commit 6fbcebc

File tree

177 files changed

+86954
-11146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+86954
-11146
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: OpenAPI Parser Validation for latest OpenAPI docs
2+
3+
on:
4+
push:
5+
branches: [ main, support/v1 ]
6+
pull_request:
7+
branches: [ main, support/v1 ]
8+
9+
jobs:
10+
11+
list-descriptions:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
matrix: ${{ steps.set-descriptions.outputs.matrix }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- id: set-descriptions
18+
run: echo "::set-output name=matrix::$(ls test/**/Resources/*.{json,yaml} | sed 's/.*\///' | jq -R -s -c 'split("\n")[:-1]')"
19+
20+
build:
21+
needs: list-descriptions
22+
strategy:
23+
matrix:
24+
descriptions: ${{ fromJson(needs.list-descriptions.outputs.matrix) }}
25+
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
submodules: recursive
32+
33+
- name: Validate description with redocly
34+
uses: fluximus-prime/redocly-cli-github-action@v1
35+
with:
36+
args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000'

0 commit comments

Comments
 (0)