GithubHelp home page GithubHelp logo

216giorgiy / supermarket-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evgomes/supermarket-api

0.0 1.0 0.0 133 KB

Simple RESTful API built with ASP.NET Core 2.2 to show how to create RESTful services using a decoupled, maintainable architecture.

Home Page: https://medium.com/free-code-camp/an-awesome-guide-on-how-to-build-restful-apis-with-asp-net-core-87b818123e28

License: MIT License

C# 100.00%

supermarket-api's Introduction

Supermarket API

Simple RESTful API built with ASP.NET Core 2.2 to show how to create RESTful services using a decoupled, maintainable architecture.

Changes list

Some changes were made to the code presented at the tutorial published on Medium and freeCodeCamp, to make the API code cleaner and to add functionalities that developers may find useful.

If you want to download the original code showed on the tutorial, download the 1.0.0 tag.

  • 1.2.1 [August 11, 2019]

    • Changed BaseResponse to use generics as a way to simplify responses (see #3).
  • 1.2.0 [July 15, 2019]

    • Changed /api/products endpoint to allow pagination (see #1).
  • 1.1.0 [June 18, 2019]

    • Added Swagger documentation through Swashbuckle;
    • Added cache through native IMemoryCache;
    • Changed products listing to allow filtering by category ID, to show how to perform specific queries with EF Core;
    • Changed ModelState validation to use ApiController attribute and InvalidResponseFactory in Startup.
  • 1.0.0 [February 4, 2019]

Frameworks and Libraries

How to Test

First, install .NET Core 2.2. Then, open the terminal or command prompt at the API root path (/src/Supermarket.API/) and run the following commands, in sequence:

dotnet restore
dotnet run

Navigate to https://localhost:5001/api/categories to check if the API is working. If you see a HTTPS security error, just add an exception to see the results.

Navigate to https://localhost:5001/swagger to check the API documentation.

API Documentation

To test all endpoints, you'll need to use a software such as Postman.

supermarket-api's People

Contributors

evgomes avatar mattbarry avatar

Watchers

James Cloos 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.