In RAML1 to OAS3 conversion, header examples should be preserved
jsamr opened this issue · comments
Jules Sam. Randolph commented
Currently, header examples are lost while they are supported in OAS3. They are not designated as a lost semantic, so they should be included in header schema.
RAML 1 source
#%RAML 1.0
title: headers example
version: 1
/last-article:
get:
description: Get latest article
responses:
200:
headers:
Last-Modified-By:
description: Author of latest modification.
example: UTF-8'fr'Jean-Pierre%20Dupont
Expected output (yaml+json)
{
"openapi": "3.0.0",
"info": {
"title": "headers example",
"version": "1"
},
"servers": [],
"paths": {
"/last-article": {
"get": {
"responses": {
"200": {
"description": "",
"headers": {
"Last-Modified-By": {
"description": "Author of latest modification.",
"schema": {
"type": "string",
"example": "UTF-8'fr'Jean-Pierre%20Dupont"
}
}
}
}
},
"description": "Get latest article",
"operationId": "GET_last-article"
}
}
},
"components": {
"schemas": {},
"responses": {},
"parameters": {},
"examples": {},
"requestBodies": {},
"headers": {},
"securitySchemes": {},
"links": {},
"callbacks": {}
}
}
Observed output (yaml+json)
{
"openapi": "3.0.0",
"info": {
"title": "headers example",
"version": "1"
},
"servers": [],
"paths": {
"/last-article": {
"get": {
"responses": {
"200": {
"description": "",
"headers": {
"Last-Modified-By": {
"description": "Author of latest modification.",
"schema": {
"type": "string"
}
}
}
}
},
"description": "Get latest article",
"operationId": "GET_last-article"
}
}
},
"components": {
"schemas": {},
"responses": {},
"parameters": {},
"examples": {},
"requestBodies": {},
"headers": {},
"securitySchemes": {},
"links": {},
"callbacks": {}
}
}