Skip to content

rvegajr/ez-api-urf-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EzApiUrfNet - Easy API URF .NET

The goal of this project is to use a variety of open source projects to point to a database and easily create an API. The application's purpose is to deal with schemas that change rapidly. This application will use powershell and EzDbSchema/EzDbCodeGen to read a database schema and generate all the entity specific classes (model, controller, services, etc). The api will be served up using a Swagger for easy querying. Route Tests will also be generated to allow the user to test if schema changes should work as expected.

Getting Started

Prerequisites

You will need MSSQL with some database installed. If you need a sample database, feel free to look for the World Wide Importers samples.

This application was created using VS2017. These instructions are assuming that you are using VS2017 to perform these steps. Yes, there is future plans to bring this to ASP.NET core soon. :)

Note that work is currently being done on CakeBuild to allow for easy deployent to target folders (hence the cake build files in the repo). Consider this feature incomplete for now, but I am almost there.

Using this project:

From NuGet

  1. Have you not set the execution for powershell yet? if not, then open a powershell prompt as an admin and type C:>Set-ExecutionPolicy RemoteSigned and hit enter, type 'y' to confirm anc close the window.
  2. in the command prompt or windows explorer line, type C:>powershell and hit enter
  3. Navigating to the path that you want to download the code to, type: C:>git clone https://github.com/rvegajr/ez-api-urf-net
  4. Open {gitroot}\ez-api-urf-net\Src\EzApi.sln
  5. Build the Solution (need the restore all the Nuget packages)
  6. Using Solution Explorer, Navigate to {Solution Root}\EzApi.Web and make sure it is selected as the "Startup Project"
  7. Using Solution Explorer, Navigate to {Solution Root}\EzApi.Web\hostappsettings.json and edit it
  8. Edit DefaultSettings->Settings->ConnectionString from Server=localhost;Database=WideWorldImportersDW;user id=sa;password=sa to your valid SQL connection
  9. Using Solution Explorer, Navigate to {Solution Root}\EzApi.Web\EzDbCodeGen\ezapicodegen.ps1, right click on this and select Open with Powershell ISE
  10. Press the ISE Green Arrow (or press F5) to execute the script (it will ask if you are sure because it will ask the reload, press 'y' + enter)
  11. If all is good, allow the solution to reload. Run the application.

Deployment

This project was design to be hosted and distributed with nuget.com.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Many thanks to the following projects that have helped in this project. This project is indebted to the hours upon hours or work that these projects have in them:

Known Issues

Swashbuckle.OData has not been updatd for ASP.NET 7. I included a compiled version from https://github.com/andyward/Swashbuckle.OData which fixed the issues that were preventing it from rendering swagger. The DLL was compiled and included in repo under "ez-api-urf-net\tools\Swashbuckle.OData"

About

A complete Api Generator using the most excellent URF framework and swagger

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published