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

API Platform - Importing a schema from a file is not auto selecting the File Type #6988

Closed
DannyDainton opened this issue Jul 24, 2019 · 3 comments
Assignees

Comments

@DannyDainton
Copy link
Contributor

Describe the bug

When importing a new API from a file, the correct file type is not being auto-selected and it defaults to JSON. This causes the user to manually go and select the file type from the dropdown list in the UI, in order to fix the JSON validation issues and see the correct syntax highlighting.

To Reproduce

  1. Go to the APIs Tab in the main app
  2. Click on the Create an API button if it's your first API or use the + New API button if it's not
  3. Import a new non-JSON schema using either of the import flows (browse for the file/drag and drop)

Expected behaviour

When a file is either Imported, the file type should be auto-selected from the list of options (If the file type is supported/content is valid).

Screenshots/gifs

The gif below shows the current in-app behaviour:

File_Type

App information:

  • App Type Native App
  • Postman Version 7.3.4
  • OS: macOS Mojave 10.14.5

Additional context

This code can be saved as a .yml file to test the issue:

openapi: 3.0.0
info:
  title: Sample API
  description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
  version: 0.1.9
servers:
  - url: http://api.example.com/v1
    description: Optional server description, e.g. Main (production) server
  - url: http://staging-api.example.com
    description: Optional server description, e.g. Internal staging server for testing
paths:
  /users:
    get:
      summary: Returns a list of users.
      description: Optional extended description in CommonMark or HTML.
      responses:
        '200':    # status code
          description: A JSON array of user names
          content:
            application/json:
              schema: 
                type: array
                items: 
                  type: string
@DannyDainton
Copy link
Contributor Author

@sankalp0o I need to reconfirm that this is still an issue as there has been a lot of work down with the import flow recently. Do you know if this was picked up as part of the work?

@sankalp0o sankalp0o assigned vvs11 and unassigned sankalp0o Aug 29, 2020
@sankalp0o
Copy link

No, this wasn't picked up. @vvs11 can you take a look, please?

@DannyDainton
Copy link
Contributor Author

No longer seeing this in Version 8. Closing out.

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

No branches or pull requests

3 participants