Git Product home page Git Product logo

eventsapi's Introduction

Building the application

The application can be built in Debug or Release mode and run directly from Visual Studio using either Docker or IIS Express. To run the WebApi application, select the desired Build or Release configuration and then run the EventsApi project.

Running tests

Acceptance and unit tests can be run directly from Visual Studio using the built-in test runner. Select the test menu and the 'run all tests' menu option.

Testing with Swagger

A web browser will be opened displaying a Swagger API documentation page. The application accepts a JSON object with the following structure:

{ "messageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "phoneNumber": "+23400000000000", "message": "Test Message" }

The application exposes the following endpoint:

Endpoint Method Description
SmsSend HTTP POST Send SMS message

With the following properties:

Field Description Type
messageId Assumed message id Guid
phoneNumber Phone number String
message SMS message String

The API produces 3 response types:

Status code Description Result
201 Created Message published to event bus
204 No Content Message already published
400 Bad Request Invalid input

Notes

The goal of the application is to demonstrate a functional API built using abstractions, given more time the following could be improved:

  • Build and deployment with docker or docker compose
  • Test coverage
  • More refined retry policies
  • Better logging

eventsapi's People

Contributors

thecsharper avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.