Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref nullable false #215

Open
root-aza opened this issue Nov 18, 2024 · 1 comment
Open

ref nullable false #215

root-aza opened this issue Nov 18, 2024 · 1 comment

Comments

@root-aza
Copy link

Minimal repoduce:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Test",
    "description": "Test",
    "version": "1.0"
  },
  "components": {
    "schemas": {
      "Test": {
        "type": "object",
        "properties": {
          "A": {
            "$ref": "#/components/schemas/TestB",
            "nullable": true
          }
        }
      },
      "TestB": {
        "type": "object",
        "properties": {
          "join": {
            "type": "string"
          }
        }
      }
    }
  }
}

Test case

<?php

declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use cebe\openapi\Reader;

$openapi = Reader::readFromJsonFile(realpath('openapi.json'));

assert($openapi->components->schemas['Test']->properties['A']->nullable == true, 'Property A is not null');
@cebe
Copy link
Owner

cebe commented Nov 20, 2024

Current implementation does not fully support OpenAPI 3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants