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

Content type not seted #965

Closed
Cheban1996 opened this issue Jun 28, 2024 · 2 comments · Fixed by #1073
Closed

Content type not seted #965

Cheban1996 opened this issue Jun 28, 2024 · 2 comments · Fixed by #1073
Labels
bug Something isn't working

Comments

@Cheban1996
Copy link

I have the next response (status = 200, description = "Successfully download", content_type = "application/octet-stream"),
but content_type not exist
image

But i expected

"200": {
     "description": "Successfully download",
     "content":
          "application/octet-stream": {}
}
@Cheban1996 Cheban1996 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
@Cheban1996 Cheban1996 reopened this Jun 28, 2024
@Cheban1996 Cheban1996 changed the title Content type no seted Content type not seted Jun 28, 2024
@juhaku
Copy link
Owner

juhaku commented Sep 15, 2024

@Cheban1996 I assume this is due to it requiring some body before the type will actually render. This though probably needs some tuning in order to support just setting the content-type without the body itself.

@juhaku
Copy link
Owner

juhaku commented Sep 16, 2024

Duplicate for #779

juhaku added a commit that referenced this issue Oct 2, 2024
Fix allow response with `content_type` without schema.

```rust
 #[utoipa::path(post, path = "/api/secret", responses(
     (status = OK, content_type = "application/octet-stream")
 ))]
 async fn post_secret() {}
```

Fixes #965
juhaku added a commit that referenced this issue Oct 2, 2024
Fix allow response with `content_type` without schema.

```rust
 #[utoipa::path(post, path = "/api/secret", responses(
     (status = OK, content_type = "application/octet-stream")
 ))]
 async fn post_secret() {}
```

Fixes #965
juhaku added a commit that referenced this issue Oct 2, 2024
Fix allow response with `content_type` without schema.

```rust
 #[utoipa::path(post, path = "/api/secret", responses(
     (status = OK, content_type = "application/octet-stream")
 ))]
 async fn post_secret() {}
```

Fixes #965
@juhaku juhaku moved this to In Progress in utoipa kanban Oct 2, 2024
@juhaku juhaku added the bug Something isn't working label Oct 2, 2024
@juhaku juhaku closed this as completed in 4147119 Oct 2, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in utoipa kanban Oct 2, 2024
@juhaku juhaku moved this from Done to Released in utoipa kanban Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants