GithubHelp home page GithubHelp logo

dekamik / dvbcrud Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 697 KB

A NuGet library for CRUD templates , complete with base entities, repositories and synchronous & asynchronous API controllers for rapid API development.

License: MIT License

C# 85.87% HTML 9.50% CSS 4.63%
crud crud-api templates

dvbcrud's People

Contributors

dekamik avatar dependabot[bot] avatar

Watchers

 avatar  avatar

dvbcrud's Issues

Investigate If-Match and If-None-Match

  • Investigate if we should implement If-Match header for PUT for mid-air collision avoidance.
  • Investigate if we should implement If-None-Match header for GET and HEAD methods

Implement CreatedAt and ModifiedAt functionality

DoD:

  • Interface ICreatedAt exists and has property DateTimeOffset CreatedAt
  • Interface IModifiedAt exists and has property DateTimeOffset ModifiedAt
  • Abstract class DvbCrudDbContext exists
  • DvbCrudDbContext.SaveChanges is overridden and updates CreatedAt and ModifiedAt if exists
  • DvbCrudDbContext.SaveChangesAsync is overridden and updates CreatedAt and ModifiedAt if exists

Create ApiEnvelope/ApiResponseWrappers for API

Think this through. We will definitely need a base response wrapper of some kind, maybe even ask consumers to define them.
We may also want to include/exclude fields like Id, CreatedAt and ModifiedAt automatically. At the same time - it's great if the models are as free as possible. Should look into this further.

Investigate separate update methods (PUT & PATCH)

Read up on what is considered best practice when handling updates.
One way is to serve two methods:

  • PUT: Updates entire objects with all property values
  • PATCH: Updates only given property values on the object

DoD:

  • We know how updates on REST APIs handled and performed, especially the semantics surrounding this
  • If applicable: the tasks for implementing the new update methods are created and available.

Evaluate HTTP verbs to add

OPTIONS should be added for endpoints, depending on allowed actions.

Check which other useful verbs should be added and create new issues for each.

Implement HEAD method for controller endpoints

A HEAD call to any endpoint must satisfy the following requirements:

  • Must return status code 200 OK or 204 No Content, further investigation required
  • Must contain header Content-Type - it may be hard-coded to application/json; charset=UTF-8. Double-check what is being returned by default on GET.
  • Must contain header ETag - ID-specific HEAD calls should generate ETags by hashing the actual response, creating a strong validator. GET calls without IDs should use weak validators and hash the last modified timestamp. These must be prefixed with W/. An ETag could look like this: "33a64df551425fcc55e4d42a148795d9f25f89d4" or this: W/"0815".
  • Must contain header Last-Modified - further development on Entity base class must be performed to support this.
  • Must contain header Content-Length - this must return the size of resource content in bytes.

Implement OPTIONS method for controller endpoints

An OPTIONS call to any endpoint must satisfy the following requirements:

  • Must return status code 200 OK or 204 No Content, further investigation required
  • Must contain header Allow - it lists available methods for resource in a comma-seperated list like so: GET,POST,PUT,DELETE,OPTIONS.
  • Must contain header Content-Type - it may be hard-coded to application/json; charset=UTF-8. Double-check what is being returned by default on GET.
  • May contain header Content-Length - it may be hardcoded to 0.
  • May contain CORS information, but not necessarily.

Add NuGet metadata

DoD:

  • Readme is added for API and EFCore
  • License is added for API and EFCore

Clean up past releases

DoD:

  • All past tags and releases are deleted on Github
  • All past packages has been deprecated on NuGet.org

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.