How to load external referenced fragments/documents? #679
|
I have the following two documents: Demo-API.v1.yaml openapi: 3.0.0
info:
title: Demo API
version: '1.0'
servers:
- url: /
paths:
/:
get:
summary: Your GET endpoint
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: string
operationId: get-hi
parameters:
- schema:
type: string
in: query
name: message
/ping:
get:
summary: Your GET endpoint
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: string
operationId: get-ping
/pong:
$ref: './Paths.v1.yaml#/pong'
components:
schemas: {}Paths.v1.yaml pong:
get:
summary: Your GET endpoint
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: stringBoth files are in the same folder, but I cannot get the var openApiReader = new OpenApiStreamReader(new OpenApiReaderSettings
{
BaseUrl = new Uri("file://C:\\source\\temp\\ConsoleApp1\\ConsoleApp1\\reference"),
ReferenceResolution = ReferenceResolutionSetting.ResolveAllReferences,
});
var readResult = await openApiReader.ReadAsync(
File.OpenRead(@"C:\\source\\temp\\ConsoleApp1\\ConsoleApp1\\reference\\Demo-API.v1.yaml"));However, the content of the What am I missing here? Version: |
Answered by
darrelmiller
Jan 19, 2022
Replies: 1 comment 3 replies
|
The code to make this happen is still work in progress. If when you write out the result you set it to inline, the results, it should include the referenced file in the output. I'm hoping to get this fixed in the next couple of weeks. |
3 replies
Answer selected by
egil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code to make this happen is still work in progress. If when you write out the result you set it to inline, the results, it should include the referenced file in the output. I'm hoping to get this fixed in the next couple of weeks.