User Tools

Site Tools


api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
api [2019/03/20 16:30] skipidarapi [2023/12/01 21:27] (current) skipidar
Line 3: Line 3:
 The API design tooling. The API design tooling.
  
 +JSON API, OpenAPI and JSON Schema Working in Harmony
 +https://blog.apisyouwonthate.com/json-api-openapi-and-json-schema-working-in-harmony-ad4175f4ff84
  
-==== Declaration ==== 
  
-=== Spring HATEOAS === +==== Communication options =====
-The https://spring.io/projects/spring-hateoas +
-is the API which is capable to generate a clean HATEOAS API +
-our of some Data Access Objects (DAOs) / Resources. +
-The requirement is - the ability to map the backend to DAOs.+
  
-By exporting the full API +{{https://s3.eu-central-1.amazonaws.com/alf-digital-wiki-pics/sharex/rNvZHNhbje.png}}
-<code> +
-http://localhost:8095/v2/api-docs?group=full-api +
-</code>+
  
-and importing it via the Swagger Editor in a browser: +==== IDEA ==== 
-http://editor.swagger.io + 
-<code> +=== Graphql API === 
-Select Paste JSON… from the File menu+Get the data by describing it https://graphql.org/ 
-</code>+ 
 + 
 +=== HATEOAS API === 
 +Use links and self describtive API resources, to navigate trhough teh API
 + 
 + 
 + 
 + 
 +==== Standard ==== 
 + 
 +=== HAL - Hypermedia api langauge === 
 + 
 +HAL really is just a document format for a hypermedia API, like HTML is for hypertext. It doesn’t tell you how to express your domain model, and doesn’t really tell you how to use HAL to submit changes. 
 + 
 + 
 +=== JSON:API  === 
 +Whereas JSON API is almost like an “ORM over HTTP”, HAL does a lot less for you though, so it’s not really an apples-to-apples type of comparison
 + 
 +HAL really is just a document format for a hypermedia API, like HTML is for hypertext. It doesn’t tell you how to express your domain model, and doesn’t really tell you how to use HAL to submit changes.
  
-It can be imported to SWAGGER form 
  
 +==== Schema====
  
 === JSON Schema === === JSON Schema ===
Line 45: Line 57:
 |Swagger Editor|Creation of the SWAGGER API| |Swagger Editor|Creation of the SWAGGER API|
  
 +==== Implementation ====
  
-=== Graphql API === 
-Get the data by describing it https://graphql.org/ 
  
 +
 +=== Spring HATEOAS ===
 +The https://spring.io/projects/spring-hateoas
 +is the API which is capable to generate a clean HATEOAS API
 +our of some Data Access Objects (DAOs) / Resources.
 +The requirement is - the ability to map the backend to DAOs.
 +
 +By exporting the full API
 +<code>
 +http://localhost:8095/v2/api-docs?group=full-api
 +</code>
 +
 +and importing it via the Swagger Editor in a browser:
 +http://editor.swagger.io
 +<code>
 +Select Paste JSON… from the File menu.
 +</code>
 +
 +It can be imported to SWAGGER form
 +
 +
 +=== Spring Katharsis.io ===
 +The lib, helping to implement an API, which is conform to Json:API.
 +
 +  * https://dzone.com/articles/create-a-json-api-rest-service-with-spring-boot-an
 +  * https://dzone.com/articles/json-api-using-katharsis-amp-spring-boot
 +
 +  * There are also libs, which generate a JSON:API conform API from Resources and Data Access Objects. E.g. https://dzone.com/articles/json-api-using-katharsis-amp-spring-boot
 +  * There is a detailed description of the API structure, separated from the implementation: https://jsonapi.org/ It gives me the possibility to design equally structured APIs, even when using different technologies. (Can mix up e.g. serverless implementations with e.g. Spring)
 +  * There is a JSON Schema, helping to validate our APIs automagically E.g. https://jsonapi-validator.herokuapp.com/
  
  
api.1553099446.txt.gz · Last modified: (external edit)