Giter Club home page Giter Club logo

api_demo's Introduction

API RESTFULL

Esta api de ejemplo nos permite realizar las operaciones basicas de un crud en 3 objetos distintos:

        *Persons 
        *Familys
        *Comments

Tareas

BackEnd

  • Conexion de api con db mongoDB
  • Integracion de Morphia ODM
  • Validaciones
  • Importacion de documentos xml a mongoDB usando la api
  • Exportacion de Colecciones mongodb y creacion de archivos xml
  • Importacion de documentos xml a mongoDB usando spring batch
  • Exportacion de Colecciones mongodb y creacion de archivos xml usando spring batch
  • Integracion de Hateoas
  • Documentar con javaDoc
  • Implementar LOGGER

FrontEnd

  • Pagina inicio con documentacion API http://localhost:8080
  • Cliente angular https://github.com/RaulAbejonDelgado/cliente_api_demo
    • Crear Tema para cliente angular
    • Crear registro
    • Implementacion de seguridad(Guards)
    • Crear Estancia usuario
      • Lectura de comentarios
      • Lectura de personas
      • Lectura de familias
      • Creacion de comentarios
    • Crear Zona administracion
      • Crear Crud
        • Crud personas
        • Crud familias
        • Crud comentarios

Notas

Para el mapeo de objetos java a mongo se usa el ODM Morphia 

Morphia

La base de datos MongoDb

MongoDB

Hateoas para enlaces hypermedia 

Hateoas

Validaciones

Bean Validation API

Usadas para la practica de importacion/ exportacion desde mongoDB a xml y viceversa

Lectura de objetos java y escritura de archivos xml

jackson-dataformat-xml

Lectura de archivos xml y mapeo a objetos java

jaxb-api

Urls de la api

Index

[GET] http://localhost:8080

Personas

[GET] http://localhost:8080/publicaciones/persons
[GET]http://localhost:8080/publicaciones/persons/{id}
[DELETE]http://localhost:8080/publicaciones/persons/{id}
[POST] http://localhost:8080/publicaciones/persons
objeto esperado:

{
    "nombre": "enhord",
    "familyId":1 
}
[PUT] http://localhost:8080/publicaciones/persons/{id}
objeto esperado:

{
	"nombre":"drohne",
	"selfId":9,
	"familyId":1
}

Importar coleccion personas

    http://localhost:8080/publicaciones/persons/data?action=1

Exportar coleccion personas

    http://localhost:8080/publicaciones/persons/data?action=2

Familias

[GET] http://localhost:8080/publicaciones/familys
[GET]http://localhost:8080/publicaciones/familys/{id}
[DELETE]http://localhost:8080/publicaciones/familys/{id}
[POST] http://localhost:8080/publicaciones/familys
objeto esperado:
{
	"nombre":"familia drohne5",
	"personas":[
		{
			"nombre":"drohne",
			"selfId":9
		}
	]
}
[PUT] http://localhost:8080/publicaciones/familys
objeto esperado:
{
    "_id": "5c29f97fa4033c513f32bf0f",
    "selfId": 11,
    "nombre": "familia Morphia Modificada",
    "personas": [
        {
            "_id": null,
            "selfId": 12,
            "familyId": 11,
            "nombre": "enhord y mi cipote2",
            "id": null
        }
    ]
}

Importar coleccion familias

    http://localhost:8080/publicaciones/familys/data?action=1

Exportar coleccion familias

    http://localhost:8080/publicaciones/familys/data?action=2

Comentarios

[GET]http://localhost:8080/publicaciones/comments
[GET]http://localhost:8080/publicaciones/comments/{id}
[DELETE]http://localhost:8080/publicaciones/comments/{id}
[POST] http://localhost:8080/publicaciones/comments
Objeto:Esperado:

{
"familia": [{
    "_id": "5c23ad0ffae44e51fe620f2b",
    "selfId": 1,
    "nombre": "familia AsierRaul"
   
}],
"texto": "asier",
"persona": [{
    "_id": "5c1a48f34d1fe28adf723f69",
    "selfId": 1,
    "familyId": 1,
    "nombre": "Raul"

}]

[PUT] http://localhost:8080/publicaciones/comments/{id}
    Objeto:Esperado:
    
    {
    "familia": [{
        "_id": "5c23ad0ffae44e51fe620f2b",
        "selfId": 1,
        "nombre": "familia AsierRaul"
       
    }],
    "texto": "asier",
    "persona": [{
        "_id": "5c1a48f34d1fe28adf723f69",
        "selfId": 1,
        "familyId": 1,
        "nombre": "Raul"

    }]

Importar coleccion familias

    http://localhost:8080/publicaciones/comments/data?action=1

Exportar coleccion familias

    http://localhost:8080/publicaciones/comments/data?action=2

api_demo's People

Contributors

raulabejondelgado 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.