Swagger open API - date-time pattern is allowing yyyy value
Swagger 3.0 by default validating against pattern ^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)*$ for given date-time field in swagger but its allowing just year without error { "date":"2020" - allowing this value } date = 2020-06-16T13:22:01.Z - validating this value properly but allowing just year where it need to restrict as per RFC3339 date-time pattern. Is this bug in swagger or some jar wrongly validating the date ?3KViews0likes0CommentsSwaggerHub with openapi 3.0.1 and oauth2 password flow
Hello, everyone. I'm new to this world and I have been trying to use create the open API specification using the swagger hub on a REST API that I already had programmed in JAVA. This API uses oauth2 (password flow) for authentication. After following the documentation, I was able to set a lot of things to run correctly, but I am still having one problem regarding the call to the service once I am already Authorize to run. The problem is that, even though I got the token correctly, it is still undefined in the curl/Request URL so I am getting an error 401 (because the token is undefined). Please, see the images below for reference: Token Response Curl and URL Request Header Request and Error I have also attached the yaml file for reference. I hope I was able to explain myself, any help will be appreciated. Thanks!1.9KViews0likes0CommentsIssue with creating a documentation when using re-usable enums
My yaml file looks like this openapi: 3.0.2 components: schemas: Countries: type: string enum: - Unknown - Afghanistan - Albania - Algeria - AmericanSamoa - "\u00c5landIslands" - NotOtherwiseSpecified , when I compile it it creates the java classes correctly, however is not creating the documentation, just gives me: GeopoliticalAffiliation - and nothing more is displayed for that praticular scheme. For the other schemes enum options are displayed, etc. Can you help me with this problem? Is this an issue of swagger or I am mistaken somehwere.The example in the swagger website and my code are following the same rules:https://swagger.io/docs/specification/data-models/enums/. P.S. I tought the problem is comming because of the special caracter, but is not. I tried without that specific enum entry and also I have another similar way reusable enum that behaves the same way.824Views0likes1Comment