Closed larsiver closed 2 years ago
Generate swagger with user provided samples possible with alternative package https://www.nuget.org/packages/MicroElements.Swashbuckle.NodaTime/ Also there is option omit sample generation
Sorry for advertising :) I can delete this message
@larsiver sorry for the late response I wound up breaking my tibia, fibula, femur, and pelvis shortly after your request. Anyways this change has been reflected in the latest release which is now pending indexing and verification at Nuget.
Nice, works like a charm.
I use this package in an auto test to generate a swagger document that is then compared against a committed version of a document. If the documents do not match, the test fails, and I have to make an informed decision on whether the change was intentional or accidental and modify code as appropriate.
To be true, I use a forked version, because in Schemas.fs the timestamp used in examples is
SystemClock.Instance.GetCurrentInstant()
. That means that generated swagger documents are not deterministic. If this is changed to some fixed instant likeInstant.FromUnixTimeTicks(15759724104663180L)
, I wouldn't need the fork.