swagger-ui

Swagger enum values not getting displayed in drop down?

我的梦境 提交于 2021-01-01 08:12:32
问题 This is my controller method where the enum is accepted @GetMapping("/{sortBy}/{page}/{size}") public ResponseDto<ReviewsResponseDto, Void> searchAllReviews( @PathVariable(value = "sortBy") ReviewsSortBy sortBy, @PathVariable Integer page, @PathVariable Integer size) This is my enum ReviewsSortBy @Getter @ToString public enum ReviewsSortBy { DEFAULT, FEATURED, RECENT; } Now the problem is that swagger doesnt display the possible values of enum in dropdown, instead it just displays

Swagger enum values not getting displayed in drop down?

一个人想着一个人 提交于 2021-01-01 08:11:15
问题 This is my controller method where the enum is accepted @GetMapping("/{sortBy}/{page}/{size}") public ResponseDto<ReviewsResponseDto, Void> searchAllReviews( @PathVariable(value = "sortBy") ReviewsSortBy sortBy, @PathVariable Integer page, @PathVariable Integer size) This is my enum ReviewsSortBy @Getter @ToString public enum ReviewsSortBy { DEFAULT, FEATURED, RECENT; } Now the problem is that swagger doesnt display the possible values of enum in dropdown, instead it just displays

Flask-Swagger-UI does not recognize path to swagger.json

会有一股神秘感。 提交于 2020-12-31 07:39:03
问题 I'm building an API, using Flask and flask-restful and flask-swagger-ui. I have now modified the project structure and now I can no longer access the project's swagger.json file. Based on the package documentation flask-swagger-ui, you would only need to change the parameter API_URL to the correct path. But even when entering relative path or full path, I can no longer access the file. My Code : from flask import Flask, jsonify from flask_migrate import Migrate from flask_restful import Api

Flask-Swagger-UI does not recognize path to swagger.json

浪尽此生 提交于 2020-12-31 07:38:08
问题 I'm building an API, using Flask and flask-restful and flask-swagger-ui. I have now modified the project structure and now I can no longer access the project's swagger.json file. Based on the package documentation flask-swagger-ui, you would only need to change the parameter API_URL to the correct path. But even when entering relative path or full path, I can no longer access the file. My Code : from flask import Flask, jsonify from flask_migrate import Migrate from flask_restful import Api

How to integrate Swagger with SpringDoc YAML?

心已入冬 提交于 2020-12-15 06:06:48
问题 I'm using Swagger to document my project.And I want generate the YAML doc from springdoc. But when I generate this YAML documentation the YAML dont have my Swagger doc coments. For example. I have one endpoint in my project: @ApiOperation(value = "Return a list of Pix Wallets.", httpMethod = "POST", response = DResponse.class) @PostMapping("/digital-wallet") public ResponseEntity<DResponse> getDigitalWallets(@RequestBody PixDigitalWalletRequest pixDigitalWalletRequest) { return ResponseEntity

NET core 2.0 Swagger & Enum Display

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-15 05:28:44
问题 i have the next enum : public enum DataTypes { [Description("All")] All, Man, Woman } and i want to achive next : to display decription for each enum to display the Enum Key and Value. i used this next post : swagger-ui-web-api-documentation-present-enums-as-strings I did the next code changes : in the enum, i defined : [JsonConverter(typeof(StringEnumConverter))] //this is using newton public enum DataTypes { [Description("All")] All, [Description("Male222")] Male, [Description("Female")]