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.

Readme instructions error #23

Copy link
Copy link
@danballance

Description

@danballance
Issue body actions

Hi,

Great project! Finally had a chance to check this out with a real use case of my own.

I had an issue getting the instructions to work. Not sure if it was my end or not, but what worked for me was:

decoders = [OpenAPICodec(), JSONCodec()]
client = Client(decoders=decoders)  
schema = client.get('http://petstore.swagger.io/v2/swagger.json', force_codec='openapi')

The error I get using format='openapi' is:

coreapi.exceptions.NoCodecAvailable: Unsupported media in Content-Type header 'application/json'

I noticed that everything seemed to work with the cli client. That's when I noticed that it uses force_codec and not format.

I don't know your code base so I'm not 100% if using force_code is correct in this context, but I thought I should create a ticket in case it hits anyone else.

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.