OpenAPITools / OpenAPITools/openapi-diff
References are not resolved according to RFC3986
@joschi is already working on this.
Since Jun 15, 2024.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
See the specification here: https://swagger.io/docs/specification/using-ref/.
This points to RFC3986 (https://tools.ietf.org/html/rfc3986) for the structure of JSON references. This RFC is not supported in openapi-diff.
I made an example of a valid reference according to OpenAPI 3, for which OpenAPI diff throws an error. See https://github.com/OpenAPITools/openapi-diff/pull/271
Example content:
openapi: 3.0.1
info:
title: Service
description: test
version: test
contact:
name: test
url: 'test'
servers:
- url: 'localhost'
paths:
/feature:
get:
summary: Get feature state
operationId: feature
description: Gets feature
parameters:
- name: feature
in: query
schema:
$ref: '#/components/schemas/Feature/properties/feature' # <---- this
required: true
responses:
'200':
description: Found feature
content:
application/json:
schema:
$ref: '#/components/schemas/Feature'
components:
schemas:
Feature:
type: object
properties:
feature:
type: string
enum:
- alpha
- beta
value:
type: boolean
required:
- feature
- value
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided OpenAPI example and compare its RFC3986 reference against the resolver behavior in openapi-diff. Review the linked specification and existing pull requests, then verify that the property reference is accepted without an error and that existing reference handling remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100