René's URL Explorer Experiment


Title: How to load external referenced fragments/documents? · microsoft/OpenAPI.NET · Discussion #679 · GitHub

Open Graph Title: How to load external referenced fragments/documents? · microsoft/OpenAPI.NET · Discussion #679

X Title: How to load external referenced fragments/documents? · microsoft/OpenAPI.NET · Discussion #679

Description: How to load external referenced fragments/documents?

Open Graph Description: 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': descr...

X Description: 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: '...

Opengraph URL: https://github.com/microsoft/OpenAPI.NET/discussions/679

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How to load external referenced fragments/documents?","text":"

I have the following two documents:

\n

Demo-API.v1.yaml

\n
openapi: 3.0.0\ninfo:\n  title: Demo API\n  version: '1.0'\nservers:\n  - url: /\npaths:\n  /:\n    get:\n      summary: Your GET endpoint\n      tags: []\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n      operationId: get-hi\n      parameters:\n        - schema:\n            type: string\n          in: query\n          name: message\n  /ping:\n    get:\n      summary: Your GET endpoint\n      tags: []\n      responses:\n        '200':\n          description: OK\n          content:\n            application/json:\n              schema:\n                type: string\n      operationId: get-ping\n  /pong:\n    $ref: './Paths.v1.yaml#/pong'\ncomponents:\n  schemas: {}
\n

Paths.v1.yaml

\n
pong:\n  get:\n    summary: Your GET endpoint\n    tags: []\n    responses:\n      '200':\n        description: OK\n        content:\n          application/json:\n            schema:\n              type: string
\n

Both files are in the same folder, but I cannot get the OpenApiStreamReader to load the content of Paths.v1.yaml into the Demo-API.v1.yaml document. My latest attempt looks like this:

\n
var openApiReader = new OpenApiStreamReader(new OpenApiReaderSettings\n{\n    BaseUrl = new Uri(\"file://C:\\\\source\\\\temp\\\\ConsoleApp1\\\\ConsoleApp1\\\\reference\"),\n    ReferenceResolution = ReferenceResolutionSetting.ResolveAllReferences,\n});\n\nvar readResult = await openApiReader.ReadAsync(\n    File.OpenRead(@\"C:\\\\source\\\\temp\\\\ConsoleApp1\\\\ConsoleApp1\\\\reference\\\\Demo-API.v1.yaml\"));
\n

However, the content of the pong path item has UnresolvedReference: true and is otherwise empty.

\n

What am I missing here?

\n

Version: 1.3.0-preview as well as the sources locally on my machine.
\n.NET: 6

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

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.

","upvoteCount":2,"url":"https://github.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998810"}}}

route-pattern/_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format)
route-controllervoltron_discussions_fragments
route-actiondiscussion_layout
fetch-noncev2:e5ba7da6-1641-d012-c4ad-ad76a20a06e8
current-catalog-service-hash9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be
request-idE1CE:1611D:7DA17D:AC71B1:69811AAC
html-safe-nonceb03a28114c8525d0ccd64c8d58fdbd49636a97591d2840149a8af8fcddea7999
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUNFOjE2MTFEOjdEQTE3RDpBQzcxQjE6Njk4MTFBQUMiLCJ2aXNpdG9yX2lkIjoiNjE0NTEwOTYyOTcyMzU0ODMzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac61f6e78dc8a08a4a8b9aa30f95dcbc81a968f3dcdcbc25cf6f35caf704101cfa
hovercard-subject-tagdiscussion:3782290
github-keyboard-shortcutsrepository,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/discussions_fragments/discussion_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/microsoft/OpenAPI.NET/679/discussion_layout
twitter:imagehttps://opengraph.githubassets.com/a1bebd98398edc8417f02412d1d4114a7a63ef1dc3405c1c304bccead9829c19/microsoft/OpenAPI.NET/discussions/679
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a1bebd98398edc8417f02412d1d4114a7a63ef1dc3405c1c304bccead9829c19/microsoft/OpenAPI.NET/discussions/679
og:image:altI 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': descr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None39fe8101494cbb823c09b619b68c80cd4d05ab7279997038dbe06bb91608abe1
turbo-cache-controlno-preview
go-importgithub.com/microsoft/OpenAPI.NET git https://github.com/microsoft/OpenAPI.NET.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id97175798
octolytics-dimension-repository_nwomicrosoft/OpenAPI.NET
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id97175798
octolytics-dimension-repository_network_root_nwomicrosoft/OpenAPI.NET
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released5b34a4e4898b066c629879feb4b184bc471d6a7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FOpenAPI.NET%2Fdiscussions%2F679
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FOpenAPI.NET%2Fdiscussions%2F679
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fdiscussions_fragments%2Fdiscussion_layout&source=header-repo&source_repo=microsoft%2FOpenAPI.NET
Reloadhttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
Reloadhttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
Reloadhttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
microsoft https://patch-diff.githubusercontent.com/microsoft
OpenAPI.NEThttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoft%2FOpenAPI.NET
Fork 282 https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoft%2FOpenAPI.NET
Star 1.6k https://patch-diff.githubusercontent.com/login?return_to=%2Fmicrosoft%2FOpenAPI.NET
Code https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET
Issues 23 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/issues
Pull requests 2 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/pulls
Discussions https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions
Actions https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/actions
Projects 0 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/projects
Models https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/models
Wiki https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/wiki
Security 0 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/security
Insights https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/pulse
Code https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET
Issues https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/issues
Pull requests https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/pulls
Discussions https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions
Actions https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/actions
Projects https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/projects
Models https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/models
Wiki https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/wiki
Security https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/security
Insights https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/pulse
Answered https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998810
darrelmillerhttps://patch-diff.githubusercontent.com/darrelmiller
egil https://patch-diff.githubusercontent.com/egil
Q&Ahttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/categories/q-a
How to load external referenced fragments/documents? https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#top
egil https://patch-diff.githubusercontent.com/egil
Answered https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998810
darrelmillerhttps://patch-diff.githubusercontent.com/darrelmiller
Return to tophttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#top
Please reload this pagehttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
egil https://patch-diff.githubusercontent.com/egil
Jan 5, 2022 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussion-3782290
Give feedback.https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
darrelmiller https://patch-diff.githubusercontent.com/darrelmiller
Jan 19, 2022 https://github.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998810
View full answer https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998810
Oldest https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679?sort=old
Newest https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679?sort=new
Top https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679?sort=top
Please reload this pagehttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
darrelmiller https://patch-diff.githubusercontent.com/darrelmiller
Jan 19, 2022 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998810
Give feedback.https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/egil
Please reload this pagehttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
egilhttps://patch-diff.githubusercontent.com/egil
Jan 19, 2022 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-1998948
Give feedback.https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/darrelmiller
Please reload this pagehttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
darrelmillerhttps://patch-diff.githubusercontent.com/darrelmiller
Jan 23, 2022 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-2025890
Give feedback.https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/egil
Please reload this pagehttps://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
egilhttps://patch-diff.githubusercontent.com/egil
Jan 23, 2022 https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679#discussioncomment-2026533
Give feedback.https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
egilhttps://patch-diff.githubusercontent.com/egil
Sign up for freehttps://patch-diff.githubusercontent.com/join?source=comment-repo
Sign in to commenthttps://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FOpenAPI.NET%2Fdiscussions%2F679
🙏 Q&A https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/categories/q-a
https://patch-diff.githubusercontent.com/egil
https://patch-diff.githubusercontent.com/darrelmiller
https://patch-diff.githubusercontent.com/microsoft/OpenAPI.NET/discussions/679
https://patch-diff.githubusercontent.com/settings/replies?return_to=1
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.