-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add parse ability #12
Comments
Wish I had the time to work on this. A related thing I would really like would be the ability to take a json schema for a property from an external source and inject it (with any required modifications). |
Hey @baohx2000 👋 I don't fully understand - what's the use case for your suggestion? 🙂 |
I generate api documentation using this library by iterating through annotations in code. The annotations also define input parameter validation using various rules, one of which is using a json schema for complex values. What I'd like to do is include the schema as part of the openapi doc that gets generated from this library. Just figured parsing json into the library would be a good first step. |
@baohx2000 So is the idea to parse JSON not only for the entire spec, but to append to an existing one? Sounds like a great idea. I'll update the issue to include. |
Need to provide a way to take a PHP array, or JSON string and convert it into an
OpenApi
instance (with child objects created).Should also be able to create any object from JSON, e.g. add a
Schema
from a JSON string (no need to parse an entire spec).Todo
parse()
method onBaseObject
class - silently ignores any errors (missing/extra properties)strictParse()
method onBaseObject
class - throws exception for any errorsparse()/strictParse()
implementationThe text was updated successfully, but these errors were encountered: