Azure Tips: Post to an Azure Function using Swagger

Поділитися
Вставка
  • Опубліковано 20 сер 2024

КОМЕНТАРІ • 18

  • @rousseausennett4668
    @rousseausennett4668 5 місяців тому

    Great video 2 mins later and my project is ready to go !

  • @21Million
    @21Million 6 місяців тому +1

    Would love to know how to do this in Java, but I understand that would be quite a bit more complicated.

  • @MyHor
    @MyHor 10 місяців тому +1

    Great job. Thank you.

    • @rowan-lea
      @rowan-lea  10 місяців тому

      You're welcome! Glad you liked it :D

  • @AcapellaNutella6
    @AcapellaNutella6 2 місяці тому

    Hey, that's my son's name, Rowan lol.

  • @AnilYadav-sp6ti
    @AnilYadav-sp6ti Рік тому +2

    Great tutorial!

  • @AlexisReyess00a
    @AlexisReyess00a 9 місяців тому

    Very useful video. I have a question, how could I add the option to have a file upload button?

  • @AcapellaNutella6
    @AcapellaNutella6 2 місяці тому

    can't get a file upload button to show on my swagger ui.

    • @AcapellaNutella6
      @AcapellaNutella6 2 місяці тому

      //tried this
      [HttpPost("UploadFile2")]
      public async Task UploadFile2(
      [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] IFormFile file)
      {
      // var file = req.Form.Files["File"];
      var myBlob = file.OpenReadStream();
      await _blobService.UploadFileAsync(myBlob, _containerName, file.FileName, file.ContentType);
      return new OkObjectResult("file uploaded successfylly");
      }

  • @AnilYadav-sp6ti
    @AnilYadav-sp6ti Рік тому +2

    Hi, how to authenticate function using client certificate from logic app? Could you please make a video for the same.

    • @rowan-lea
      @rowan-lea  Рік тому

      I'll absolutely make a video for that. I'll prioritise it, so you should see something soon!

  • @ericn6463
    @ericn6463 11 місяців тому +1

    is there a way to document these items automatically by using xml generated by api build

    • @rowan-lea
      @rowan-lea  11 місяців тому

      Do you mean keep/store the records you're sending through Swagger? I'm not sure if Swagger allows you to do that, but I'm sure you could do something similar with postman, I know it has some scripting capabilities built in but I haven't used them myself.

    • @ericn6463
      @ericn6463 11 місяців тому

      @@rowan-lea I mean being able to produce a swagger.json with a with endpoints without decorating each function endpoint by using the xml of the build dll

    • @rowan-lea
      @rowan-lea  11 місяців тому

      @@ericn6463 ahhh I see. It's not something I've ever come across I'm afraid, but it doesn't mean there isn't anything out there. Perhaps there's a third party/open source solution for that.

    • @ericn6463
      @ericn6463 11 місяців тому

      From this video ua-cam.com/video/LZBD-ZAKZ0g/v-deo.htmlsi=OBddpkNjEl3alxh2 you can see swagger has been generated automatically on a web api with adding attributes watch from 7:44. I wanted to know if this was possible with a functions app

    • @rowan-lea
      @rowan-lea  11 місяців тому

      @@ericn6463ah I see! Yes you should be able to, this document explains it better than I could, but you need to create a startup class that inherits from FunctionsStartup to achieve it: www.c-sharpcorner.com/article/how-to-configure-swagger-in-azure-functions-apis/