Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Proposal of OpenAPI 3 #133

Description

@fmigneault

Hi!

I've been working on OpenAPI-3 support (#69) building on top of the code of this repo. I've got it working now. My code is not completely cleaned up and I can't have possibly tested all API use cases, but I would be happy make it into a proper PR if the maintainers are also willing to support it here.

The changes for the current code are as follows:
master...fmigneault:oneOf-objects

Plus the following objects I added in my repo to override/expand the existing converters:
https://github.com/crim-ca/weaver/blob/job-io-extras/weaver/wps_restapi/colander_extras.py

I'm using the following spec (quite big):
https://github.com/crim-ca/weaver/blob/job-io-extras/weaver/wps_restapi/swagger_definitions.py

I'm getting the results/features like follows :

  • keywords like oneOf, allOf, anyOf supported (with deserialize() validation) (oneOf, allOf, anyOf, not - keyword for objects and arrays #95)
  • support specifying format or pattern of string type (and adds the appropriate validator for free)
  • each view with different accept or content_type or renderer can make a separate item under the responses.content or requestBody.content as required by the spec.

image

other things:

  • fix the description not carried over (Path parameters don't preserve description #94)
  • support default auto-replaced when using schema deserialization and other nice-to-have schema definitions
  • support of writing the title when the auto-one is not so great
  • backward support of Swagger 2.0 using an input to generate and/or directly set in CorniceSwagger class.

image

Let me know of your thoughts and if we could improve it even more.

Activity

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

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