You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.reprezen.swagedit.core.model.Model.find(String) always returns null for path items.
Why is that:
Model.nodes is a table which uses un-encoded JsonPointers as the keys, e.g. /paths/~1test~1{id}
Model.find look-ups the Model.nodes using encoded JsonPointers for path items, e.g. #/paths/~1test~1%7Bid%7D
Symptoms
The symptoms below are true for reference to path items with { or }
1 You can use a reference to a path item anywhere and the validator will be OK with it.
Example:
---
openapi: "3.0.0"info:
version: "1.0.0"title: Test APIpaths:
/test/{id}:
get:
summary: Readdescription: Provide details for the entire list (for collection resources) or an item (for object resources)responses:
'200':
description: OKcontent:
application/json:
schema:
# This is a reference to the parent path item,# but i should be a reference to a schema!!!$ref: "#/paths/~1test~1%7Bid%7D"
2 operationRef shows a validation error when operation path has { or }
At the same time, if you try to use a reference to child operation in a valid context as a value for operationRef, it creates an error about an incorrect type:
---
openapi: "3.0.0"info:
version: "1.0.0"title: Test APIpaths:
/test/{id}:
get:
summary: Readdescription: Provide details for the entire list (for collection resources) or an item (for object resources)responses:
'200':
description: OKcomponents:
links:
myLink:
# A valid ref creates an erroroperationRef: "#/paths/~1test~1%7Bid%7D/get"
The text was updated successfully, but these errors were encountered:
Problem
com.reprezen.swagedit.core.model.Model.find(String) always returns
null
for path items.Why is that:
Model.nodes
is a table which uses un-encoded JsonPointers as the keys, e.g./paths/~1test~1{id}
Model.find
look-ups theModel.nodes
using encoded JsonPointers for path items, e.g.#/paths/~1test~1%7Bid%7D
Symptoms
The symptoms below are true for reference to path items with
{
or}
1 You can use a reference to a path item anywhere and the validator will be OK with it.
Example:
2
operationRef
shows a validation error when operation path has{
or}
At the same time, if you try to use a reference to child operation in a valid context as a value for
operationRef
, it creates an error about an incorrect type:The text was updated successfully, but these errors were encountered: