openapi Questions
2
Basically all my DTOs are generated with nullable fields like: id?: number;. How can I create non-nullable types for types which are not flagged as nullable.
My DTO schema looks like this:
"U...
Disk asked 8/10, 2020 at 12:22
1
My OpenAPI specification contains a lot of objects. According to the spec, a free-form object will by default have additionProperties:true. This is why when I use NSwag to generate a C# client, all...
Schlueter asked 11/10, 2022 at 12:8
1
Solved
For some reason handling Form Data and File Upload at the same time raises an error.
from typing import Annotated
from pydantic import BaseModel, StringConstraints, EmailStr
class RouteBody(BaseMod...
Clementclementas asked 24/9 at 18:59
3
I want to implement 2 Endpoints in my REST API:
@PostMapping("/example")
public ObjectResponse postObject(@RequestBody Example example){... //Add new Example to DB}
@PutMapping("/ex...
2
There is some questions around this topic, but I dind't find the right way to do it.
What I want is to define all parameters in a single place and reuse it with no need to write it again. I alread...
Myrlemyrlene asked 5/6, 2020 at 9:56
11
I am moving to Spring doc open Api and trying to hit the URL. I am getting the below error and logs from console.
URL : http://localhost:8080/swagger-ui/index.html?url=v3/api-docs
Logs :
2020-0...
Haught asked 24/3, 2020 at 17:23
1
I have a FlatDTO that needs to be mapped to a nested Response containing InfoData and MetaData
The code for the response is generated by OpenAPI. So the below definitions can't be changed.
package ...
Bloxberg asked 21/11, 2022 at 5:36
9
Solved
I have a symfony project, where I use api-platform.
I have an entity, and I have data providers for it. I am in trouble with definition of additional parameters for a collection endpoint.
An entity...
Boarhound asked 16/5, 2018 at 11:40
3
Solved
I am using Spring Boot and Microservices stack using Spring Cloud APIGW. I am using the same code mentioned here: https://piotrminkowski.com/2020/02/20/microservices-api-documentation-with-springdo...
Werewolf asked 15/8, 2022 at 5:9
3
I'm trying to define a file download endpoint using the OpenAPI spec (v3). I am facing two problems.
1) the file is not being downloaded
2) within swagger-ui, the response body shows a message that...
Galiot asked 9/1, 2018 at 1:3
3
We have a Swagger.json output by using AddOpenApiDocument (see below).
A snippet from the swagger as below shows it returns a 200 response type of application/json. The schema part (which I am not ...
Resistant asked 25/4, 2021 at 14:48
3
I am trying to generate OpenAPI (version 3.0.1) specification for my Java code. In order to achieve this I use Swagger Annotations (version 2.0.8) and Swagger Maven Plugin.
I have a problem with E...
1
Is it possible to describe a HATEOAS REST API with OpenAPI?
When I describe the API in HAL Format I would need to define three schemas for it (one for Request Payloads, one for Collection Resource ...
Pozzy asked 26/11, 2020 at 18:56
3
Following the example of an OpenAPI 3 definition:
components:
schemas:
Foo:
properties:
string:
type: string
enumField:
type: string
enum: ['VALUE_1', 'VALUE_2']
Bar:
properties:
enumFi...
7
Solved
I want to use Arrow type in FastAPI response because I am using it already in SQLAlchemy model (thanks to sqlalchemy_utils).
I prepared a small self-contained example with a minimal FastAPI app. I ...
Nachison asked 25/8, 2021 at 21:57
4
I've managed to generate the interfaces from a .yaml open-api descriptor file, but, as in the question title, I'd love to change the response type of those interfaces from ResponseEntity to my own ...
Relational asked 28/4, 2020 at 8:59
2
Solved
I'm using Swashbuckle (6.1.1) in a .Net 5.0 Web API. I'm still learning, but I'd like to implement a class where certain properties only are valid when 'reading' with a GET, and other properties wh...
Strangulation asked 7/4, 2021 at 18:56
4
I'm building a fuzzer for a REST API that has an OpenAPI (Swagger) definition.
I want to test all available path from the OpenAPI definition, generate data to test the servers, analyse responses c...
Croce asked 31/12, 2016 at 13:35
3
Solved
Is there a way to generate OpenAPI v3 specification from go source code? Let's say I have a go
API like the one below and I'd like to generate the OpenAPI specification (yaml file) from it. Somethi...
3
Solved
I'm switching from Springfox 3.0 to OpenAPI 3.0 + Springdoc-openapi.
In Springfox the tag order is alphabetical, but in Springdoc's Swagger UI, the order appears to be random.
How do I control the ...
Woodrum asked 20/1, 2022 at 15:42
2
Solved
I use OpenAPI spec to generate Java POJOs. What do I need to specify in Open API yaml to generate the equivalent of below POJO ?
...
@JsonIgnore
public String ignoredProperty;
...
I have the yaml ...
Kelsy asked 18/11, 2020 at 17:44
3
Solved
The @nestjs/swagger doc describes here that defining an extra model should be done this way:
@ApiExtraModels(ExtraModel)
export class CreateCatDto {}
But what is ExtraModel here ? The doc is not...
Omer asked 10/4, 2020 at 15:16
3
There seems to be number of Python libraries dedicated to validate the correctness of an OpenAPI schema. While this might be useful, I can frankly just write my OpenAPI schema here it in https://ed...
3
Solved
I'm having trouble rendering an example request body in openapi. I've distilled it down to this simple example:
openapi: 3.0.2
info:
title: Test
version: "1"
paths:
/Users:
post:
req...
Pyorrhea asked 27/7, 2020 at 7:9
2
Solved
First to have a clear idea of the OpenAPI Specification itself is, let's see how it is defined on its official website (https://github.com/OAI/OpenAPI-Specification):
The goal of The OpenAPI Speci...
Donor asked 7/6, 2017 at 8:45
1 Next >
© 2022 - 2024 — McMap. All rights reserved.