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

bug: Swagger 3.0.0 datetime #23

Open
jitka opened this issue Sep 1, 2020 · 0 comments
Open

bug: Swagger 3.0.0 datetime #23

jitka opened this issue Sep 1, 2020 · 0 comments

Comments

@jitka
Copy link

jitka commented Sep 1, 2020

When I try to create object with date-time I got

Fetch error
Internal Server Error /swagger.json

My simple app:

import falcon
import swagger_ui
from wsgiref import simple_server

app = falcon.API()
swagger_ui.falcon_api_doc(
    app, config_path="./swagger.yaml", url_prefix="/", title="API doc planed",
)

with simple_server.make_server('', 8000, app) as httpd:
    httpd.serve_forever()

specification:

openapi: 3.0.0
info:
  version: 1.0.0
  title: Example
  contact:
    email: jitka@ucw.cz
servers:
  - url: http://localhost:8000
paths:
  "/":
    get:
      summary: Minimal example
      responses:
        "200":
          description: successful operation
components:
  schemas:
    Revision:
      type: object
      properties:
        revisionId:
          type: integer
          description: Monotonic revision ID, starting from zero
          example: 0
        created:
          type: string
          format: date-time
          description: Timestamp of the creation of this section
          example: 2019-02-01T17:23:11.683Z

Without that created property it works fine. I check that swagger.yaml is valid in many tools.

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