Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.4.3-beta.1]

### Fixed
- `nullable` properties are now translated into a JSON Schema `null` type in the generated response schema.

## [2.4.2] - 2026-07-21

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openapi2postman",
"version": "2.4.2",
"version": "2.4.3-beta.1",
"description": "openapi2postman",
"bin": {
"o2p": "index.js"
Expand Down
101 changes: 101 additions & 0 deletions seeds/parserBodyNullableInitial3.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"openapi":"3.1.0",
"info":{
"version":"1.0.0",
"title":"Nullable properties"
},
"paths":{
"/professionals":{
"get":{
"description":"Returns the professionals adhered to the SAC",
"operationId":"findProfessionals",
"responses":{
"200":{
"description":"professional response",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/Professional"
}
}
}
}
}
}
}
},
"components":{
"schemas":{
"Professional":{
"type":"object",
"required":[
"nombre"
],
"properties":{
"nombre":{
"type":"string"
},
"razon_social":{
"type":[
"string",
"null"
],
"maxLength":70,
"description":"Razon social"
},
"estado":{
"type":[
"string",
"null"
],
"enum":[
"ALTA",
"BAJA",
null
]
},
"telefonos":{
"type":[
"array",
"null"
],
"items":{
"type":"string"
}
},
"info_profesional":{
"type":[
"object",
"null"
],
"description":"Datos del profesional adherido al SAC.",
"required":[
"codigo"
],
"properties":{
"codigo":{
"type":[
"integer",
"null"
]
}
}
},
"contacto":{
"oneOf":[
{
"type":"string"
},
{
"type":"integer"
},
{
"type":"null"
}
]
}
}
}
}
}
}
116 changes: 116 additions & 0 deletions seeds/parserBodyNullableInitial3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"openapi":"3.0.0",
"info":{
"version":"1.0.0",
"title":"Nullable properties"
},
"paths":{
"/professionals":{
"get":{
"description":"Returns the professionals adhered to the SAC",
"operationId":"findProfessionals",
"responses":{
"200":{
"description":"professional response",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/Professional"
}
}
}
}
}
}
}
},
"components":{
"schemas":{
"Professional":{
"type":"object",
"required":[
"nombre"
],
"properties":{
"nombre":{
"type":"string"
},
"razon_social":{
"type":"string",
"nullable":true,
"maxLength":70,
"description":"Razon social"
},
"estado":{
"type":"string",
"nullable":true,
"enum":[
"ALTA",
"BAJA"
]
},
"telefonos":{
"type":"array",
"nullable":true,
"items":{
"type":"string"
}
},
"info_profesional":{
"type":"object",
"nullable":true,
"description":"Datos del profesional adherido al SAC.",
"required":[
"codigo"
],
"properties":{
"codigo":{
"type":"integer",
"nullable":true
}
}
},
"contacto":{
"nullable":true,
"oneOf":[
{
"type":"string"
},
{
"type":"integer"
}
]
},
"compuesto":{
"allOf":[
{
"$ref":"#/components/schemas/Base"
},
{
"type":"object",
"nullable":true,
"properties":{
"extra":{
"type":"string",
"nullable":true
}
}
}
]
}
}
},
"Base":{
"type":"object",
"required":[
"id"
],
"properties":{
"id":{
"type":"integer"
}
}
}
}
}
}
78 changes: 78 additions & 0 deletions seeds/parserBodyNullableInitialSwagger2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"swagger":"2.0",
"info":{
"version":"1.0.0",
"title":"Nullable properties"
},
"paths":{
"/professionals":{
"get":{
"description":"Returns the professionals adhered to the SAC",
"operationId":"findProfessionals",
"responses":{
"200":{
"description":"professional response",
"schema":{
"$ref":"#/definitions/Professional"
}
}
}
}
}
},
"definitions":{
"Professional":{
"type":"object",
"required":[
"nombre"
],
"properties":{
"nombre":{
"type":"string"
},
"razon_social":{
"type":"string",
"x-nullable":true,
"maxLength":70,
"description":"Razon social"
},
"estado":{
"type":"string",
"enum":[
"ALTA",
"BAJA"
]
},
"estado_nullable":{
"type":"string",
"x-nullable":true,
"enum":[
"ALTA",
"BAJA"
]
},
"telefonos":{
"type":"array",
"x-nullable":true,
"items":{
"type":"string"
}
},
"info_profesional":{
"type":"object",
"x-nullable":true,
"description":"Datos del profesional adherido al SAC.",
"required":[
"codigo"
],
"properties":{
"codigo":{
"type":"integer",
"x-nullable":true
}
}
}
}
}
}
}
Loading