API-ly Ever After: OpenAPI in .NET 9

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 11

  • @VladyslavHorbachov
    @VladyslavHorbachov Месяц назад +3

    Great demo! I'd like to see some presentation about Kiota and how it's integrated with current open API workflows as well.

  • @alexlo5655
    @alexlo5655 Месяц назад +4

    Great demo! Do you have a source code for it on a GitHub?

  • @andrijs1521
    @andrijs1521 Месяц назад +3

    Could you please provide source code for this presentation?

  • @eugene5096
    @eugene5096 Месяц назад +2

    Thank you guys, just wonder why things that are done in schema transformer could not be done via attributes ?

    • @kurumi690
      @kurumi690 Месяц назад +3

      My first thought is because of NativeAOT friendly, or we need to create some source gen

    • @safiaabdalla5656
      @safiaabdalla5656 Месяц назад

      There's no out-of-the-box attributes for settings examples for types so we relay on transformers for this. For these kinds of situations, transformers provide more flexibility and reduce the amount of new API that needs to be added.

    • @passionblackbay
      @passionblackbay 27 дней назад

      @@safiaabdalla5656 Transformers work well for security schemes and requirements, but they feel awkward for defining example values. With the Swashbuckle generator, it's at least possible to use XML comments for classes and route/query params, which is more convenient. However, is there an example available for using transformers specifically with example values for route/query parameters? Having an [Example()] or [Examples()] attribute (like [description()]) would be far more convenient...

  • @gibbonaci
    @gibbonaci Месяц назад +3

    what about fluentvalidation here?

    • @safiaabdalla5656
      @safiaabdalla5656 Месяц назад +4

      We don't provide built-in support for mapping FluentValidation configurations to OpenAPI documents but it is something that FluentValidation can provide by building on top of the transformers API in their own packages.

  • @gibbonaci
    @gibbonaci Месяц назад

    There's one thing I would like to point out after initial testing, the `dotnet watch` command is not rebuilding the definitions so hot reloading needs to be turned off!