Skip to content

Conversation

mquan
Copy link
Owner

@mquan mquan commented Aug 9, 2023

Use https://github.com/joolfe/postman-to-openapi to convert from postman to OpenAPI Spec.

🚫 Blockers:

  1. schema types in raw body aren't inferred. Project isn't maintained, the following issues have been opened for 6months+
    Generating Schemas from examples joolfe/postman-to-openapi#237
    Schema generation joolfe/postman-to-openapi#246

  2. Even after above hurdle there's no way to tell if a parameter is required or not

Both stem from postman collection being a bad standard to store API spec

defaultTag: "General",
});

return JSON.parse(oas);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Types inference can be done here, so we're not totally blocked by postman-to-openapi. However, there's still no way to infer required from the collection.

};

const parseJSON = async (filename: string) => {
const rawText: string = await fs.readFile(filename, "utf8");
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently only supports local file, need remote file support to be consistent with SwaggerParser

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant