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

Support parsing Swagger Specification #3

Open
7 tasks
blast-hardcheese opened this issue Jan 20, 2017 · 0 comments
Open
7 tasks

Support parsing Swagger Specification #3

blast-hardcheese opened this issue Jan 20, 2017 · 0 comments

Comments

@blast-hardcheese
Copy link

blast-hardcheese commented Jan 20, 2017

I'm interested in writing a Scala competitor to swagger-codegen using Argus and scala.meta.

Currently unsupported:

  • anyOf / allOf "Should be simple to add, just haven't done it yet."

allOf is all that's needed, but anyOf should be implemented for completeness

  • default "Schemas can specify the default value to use for a field. Currently we just ignore these."

Needed, but would prefer to implement default values in a way that doesn't leverage case class default parameters. Open to discussion, but it violates a wartremover wart (and a convincing argument against default properties).

  • not "Not sure how you could specify this in a type language. Needs more thoughts"

As with default values, validation could be generated as a separate structure that could be optionally applied by consumers of a generated argus case class schema.

  • additionalProperties / additionalItems "Json schema lets you specify free-form properties too. These are unsupported for now (although I think this should be easy now there's supprot(sic) for Any types)"

Only additionalProperties are required, but additionalItems should be supported as well.

  • patternProperties "What should be the objects fields in this case? Maybe we just make it a Map?"

Unnecessary

  • dependencies. "Dependencies can also extend the schema... sigh."

Doesn't seem necessary

  • Any of the validation-only info, such as maxItems, since it doesn't contribute to the structure.

Could be combined with the validation structure generated by not


I'd be interested in feedback for some of these ideas before I start trying to implement some of them.

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

No branches or pull requests

1 participant