OpenAPI: Validate $ref
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 4
- Joined: Thu Jun 26, 2025 2:19 pm
OpenAPI: Validate $ref
I'm trying to write an OpenAPI yaml document and do not get warned about invalid (non-existing) $ref values.
Example:
Here the does not exist.
Should Oxygen XML editor validate those?
I'm using the latest version 27.1, build 2025041508.
Example:
Code: Select all
---
openapi: 3.1.0
info:
version: 1.0.0
title: Example.com
servers:
- url: http://example.com/api/v1
paths:
/user:
get:
summary: Get user by user name
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/NoUser'
components:
schemas:
User:
type: object
properties:
username:
description: User supplied username
type: string
Code: Select all
$ref: '#/components/schemas/NoUser'
Should Oxygen XML editor validate those?
I'm using the latest version 27.1, build 2025041508.
-
- Posts: 40
- Joined: Wed Sep 09, 2020 3:17 pm
Re: OpenAPI: Validate $ref
Post by florin_nica »
Hello,
Thank you for the feedback and for the example.
At the moment, the editor is unable to validate references within OpenAPI documents, as the parsers we use for both YAML and JSON formats are limited to detecting syntax/structure errors only. As a result, missing or invalid $ref values will not be reported. However, one advantage of the JSON editor for OpenAPI documents is that references are clickable—if the referenced component exists, you can navigate to it using Ctrl + click.
Improving the OpenAPI editing experience is part of our future plans, but at this time it is difficult to provide a timeline for when such enhancements will be available.
Regards,
Florin
Thank you for the feedback and for the example.
At the moment, the editor is unable to validate references within OpenAPI documents, as the parsers we use for both YAML and JSON formats are limited to detecting syntax/structure errors only. As a result, missing or invalid $ref values will not be reported. However, one advantage of the JSON editor for OpenAPI documents is that references are clickable—if the referenced component exists, you can navigate to it using Ctrl + click.
Improving the OpenAPI editing experience is part of our future plans, but at this time it is difficult to provide a timeline for when such enhancements will be available.
Regards,
Florin
-
- Posts: 4
- Joined: Thu Jun 26, 2025 2:19 pm
Re: OpenAPI: Validate $ref
Unfortunately this doesn't work for the YAML editor.However, one advantage of the JSON editor for OpenAPI documents is that references are clickable—if the referenced component exists, you can navigate to it using Ctrl + click.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service