-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] OpenAPI Spec creator #69
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build finished. |
6 similar comments
Build finished. |
Build finished. |
Build finished. |
Build finished. |
Build finished. |
Build finished. |
- `EntityRouterBuilder` abstract class has the final method `getRouter` that creates the router and uses methods that child classes must implement - `StacRouterBuilder` and `OgcRouterBuilder` extend `EntityRouterBuilder` and create STAC and OGC specific routers - `DxMeteringRouter` extends `EntityRouterBuilder` but only provides static routes for DX metering APIs
…nterface (SPI) and added GisEntityInterface class - Added AutoService dependency to pom, along with entry in annotationProcessor block - Latter is required to generate files in META-INF that are required by SPI for all annotated classes - Added `GisEntityInterface` to model any GIS entity that requires dynamic route generation - Implementers of this class will be accessed by SPI
…chema - Once the OpenAPI Specs are generated/regenerated, we use JSON Schema to validate
- Remove routers and router builder code - This will be handled by another component - Added method `resetRouter` - This method will be called by the other component to add/refresh routes served by the ApiServerVerticle - Update server start-up by waiting for router to get initialized - Wait for router to get at least one path - In case router is not initialized, throw RuntimeException - Update all API methods to be public - So that routers can be built using the ApiServerVerticle object - Add method for specifically serving landing page - For OGC Features, update getting of collection ID from routing context by splitting path instead of path param - Since every collection has a specific path in the OpenAPI spec, cannot use path param anymore - Update AuthHandler to get collection ID by splitting instead of path param
…C Feature collections
…nd router creation/regeneration
Build finished. |
1 similar comment
Build finished. |
retest this please |
Build finished. |
retest this please |
Build finished. |
The main class here is `OgcFeaturesEntity` that implements `GisEntityInterface` and is accessible with SPI, so can be used to generate spec and supply routes as well. The rest of the classes are helpers. CollectionMetadata ------------------ - Class that contains data about an OGC Feature collection and contains methods for OpenAPI spec building PostgisGeomTypes ---------------- - Enum containing all geometry types supported in PostGIS OasTypes -------- - Enum to hold all valid types in OpenAPI and support mapping of Postgres/PostGIS types to OpenAPI types
- Added database config since Postgres LISTEN/NOTIFY channel needs to be created in RouterManager - Added geometry max limit config for configuring the maximum number of feature sent in the /collections/items endpoint depending on the geometry of the collection
- Before deploying instances of the ApiServerVerticle, initialize one instance of RouterManager and register all instances of ApiServerVerticle with RouterManager
- Remove paths that are getting automatically generated
- Was removed from ApiServerVerticle
- No dynamic route creation for now, only static routes
- No dynamic route creation for now, only static routes
- Remove all CompositeFuture.all, change to Future.all since former is deprecated - Update some logs levels
…greSQL integer types to OpenAPI integer type
- Replaced all hard-coded URLs in OGC, STAC specs with `${HOSTNAME}` then replacing the placeholder with the configured `hostName` in `commonConfig` on first router build - Added production and development URLs to metering config - Did not do placeholder replacement as it is a little more difficult - Removed sed find-replace of Jenkins server URL in Dockerfile, since it should be taken care of by this change
… auth is disabled (`disable.auth` property) for OGC and STAC specs. Also added token required header for dynamic OGC routes and assets API - In OGC,STAC specs, made the token header a $ref and updated paths accordingly - Added token header for assets API - In RouterManager, check for `disable.auth` property and set `required` as false for the token header in OGC,STAC specs - In CollectionMetadata, set `/collections/{collectionId}/items` and `/collections/{collectionId}/items/{featureId}` to have token header
….resetRouter - STAC APIs were not working when it was in the former
…e queries - ORDER BY added for all feature queries since it seems that when using the PostGIS functions, we cannot guarantee that same result set is returned for a given limit and offset - Using ORDER BY forces order, therefore same result set always returned
- As of this commit, FeatureQueryBuilder subtracts 1 from given offset always
…r OGC features - OGC features compliance spec was failing because it was conditionally there
Build finished. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.