Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Data types in generated schema should be more specific #25

Copy link
Copy link
@augustawind

Description

@augustawind
Issue body actions

I've noticed a couple of small, but important issues with how data types are handled in Swagger schema generation:

  1. The format field, which can add helpful context to string types, isn't being used at all (except in this special case). This could be used to distinguish, for example, a plaintext string field (such as a description or name field) from a UUID field (which would be signified by "format": "uuid").
  2. When dealing with Array types (from M2M or FK fields, for example), the item type is always set to "string" (see here). There are many scenarios where this doesn't make sense, e.g. when you have a ForeignKey field pointing to a model that uses an IntegerField as its primary key.

Is this something that's on your radar? I'd very much like to see these changes happen (and I'm willing to do the work!).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.