Skip to content

JSON Schema Faker update for newer schema versions? #885

@JaredAAT

Description

@JaredAAT

This package has been updated to support OpenAPI 3.1, which is great, and with OpenAPI 3.1, it bring support for newer versions of JSON Schema (https://spec.openapis.org/oas/v3.1.2.html#schema-object).

It currently seems, that you have hardcoded support for JSON Schema Draft-04, and whatever might be the latest JSON schema (which i'm not sure is intentional), only within the JSON Schema Faker asset you have included in the package: https://github.com/postmanlabs/openapi-to-postman/blob/develop/assets/json-schema-faker.js#L1487

So currently, If I have a schema defined as:

{
    $schema: "http://json-schema.org/draft-07/schema#",
    properties: { message: { type: "string" }, errors: { type: "string" } },
    type: "object",  
}

The JSON Schema Faker will ignore my schema, and not attempt to fake the schema.

It seems you might have taken a rip of the source code from an old version of https://github.com/json-schema-faker/json-schema-faker and it seems that they have updated their package, so that it's an npm package, and allows for faking of newer JSON Schemas. Please can you either add support for newer schemas by updating your hardcoded JSON Schema $schema references, or use the json-schema-faker package to do the faking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions