JamesRandall / FunctionMonkey

Write more elegant Azure Functions with less boilerplate, more consistency, and support for REST APIs. Docs can be found at https://functionmonkey.azurefromthetrenches.com
MIT License
294 stars 50 forks source link

OpenAPI: how to get string marked as Required #148

Open ArryMatt opened 4 years ago

ArryMatt commented 4 years ago

Firstly, I'm still on version 3.0.17 and will be here for a while on this project. I do want to upgrade, just it's not the correct time for this project.

I have a delete command that has a string of SerialNumber that I want to be marked in the OpenAPI as required and I can't make it so.

I tried: [Required] [Key] Fluent validator of NotNull & NotEmpty [JsonProperty(Required = Required.Always)]

I've been through the code and am at a loss.

What am I missing?

MarkusBernhardt commented 4 years ago

Hi Arry,

3.0.17 is too old for that.

This was merged in with #102 into v4.0.56-beta.4.

142 would bring more OpenAPI functionality, but not merged in right now.

Cheers, Markus