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

Endpoint with content type of application/yaml does not seem to be supported #186

Closed
mmeroberts opened this issue Sep 6, 2023 · 1 comment

Comments

@mmeroberts
Copy link

With an OpenAPI spec that contains the following in the response section. The explore does not detect the application/yaml Accept type.

     responses:
        '200':
          description: OK
          content:
            application/yaml:
              schema:
               type: string

Output from martian/explore when using application/yaml:

{:summary "Retrieve a object",
 :parameters
 {:object-name java.lang.String,
  {:k :effective} (default Bool false)},
 :returns
 {200 nil,
  400
  {{:k :url} java.lang.String,
   :localizedMessage java.lang.String,
   {:k :details} {}},
  404
  {{:k :url} java.lang.String,
   :localizedMessage java.lang.String,
   {:k :details} {}},
  nil
  {{:k :url} java.lang.String,
   :localizedMessage java.lang.String,
   {:k :details} {}}}}

Notice the nil after the 200.

When setting the content to application/json the output is:

{:summary "Retrieve a object",
 :parameters
 {:object-name java.lang.String,
  {:k :effective} (default Bool false)},
 :returns
 {200 java.lang.String,
  400
  {{:k :url} java.lang.String,
   :localizedMessage java.lang.String,
   {:k :details} {}},
  404
  {{:k :url} java.lang.String,
   :localizedMessage java.lang.String,
   {:k :details} {}},
  nil
  {{:k :url} java.lang.String,
   :localizedMessage java.lang.String,
   {:k :details} {}}}}
@mmeroberts
Copy link
Author

I see in the Readme there is an option to add your own encoder so I will close this.

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