I am not seeing the runtime proxy mappings listed when accessing http://localhost:8080/mappings. The endpoints work, however, they are not appearing in the mappings list.
It looks like this is a known and rather old issue: https://github.com/spring-projects/spring-boot/issues/4541
Related
I am using an Swagger interface for a REST API app in Quarkus and seems that all my methods/Classes are show on Swagger, so i want to removed some of them, to not be visible anymore into Swagger.
I have try with #Hidden, #Ignore, #Operation(hidden = true), and so one but those Classes are still visible there. Any idea ?
Have you tried #Schema(hidden=true) Pojo classes that are used as input or output typically ends up in the schema model. For methods that represents an operation, #Operation(hidden=true) should work
I am learning NativeScript + Angular2 with ServiceStack in C# as the backend.
For the app, I generated TypeScript classes using the typescript-ref command, for use with the JsonServiceClient in ServiceStack:
>typescript-ref http://192.168.0.147:8080 RestApi
It all looked sweet and dandy, until I discovered that it seems to ignore that the ServiceStack Services and Response DTOs are in different namespaces on the .NET side:
I have different branches of services, where the handlers for each service might differ slightly between the branches. This works well in ServiceStack, the Login and handlers work just as expected.
So, on the app/NativeScript/Angular2-side, I used the typescript-ref and generated the restapi.dtos.ts. The problem is it skips the namespace difference and just creates duplicate classes instead (from VSCode):
The backend WS in ServiceStack is built in this "branched" fashion so I don't have to start different services on different ports, but rather gather all of them on one port and keep it simple and clear.
Can my problem be remedied?
You should never rely on .NET namespaces in your public facing Services Contract. It's supported in .NET Clients but not in any other language which requires that each DTO be uniquely named.
In general your DTOs should be unique within your entire SOA boundary so that there's only 1 Test DTO which maps to a single schema definition which ensures that when it's sent through a Service Gateway, resolved through Service Discovery, published to a MQ Server, etc it only maps to a single DTO contract.
I have a very simple service project (SpringBootApplication) that exposes a REST endpoint via a Spring Boot controller class. The controller maps an /events endpoint that converts a simple incoming event DTO into a slightly different event entity object that is then persisted in a database via a org.springframework.data.repository.CrudRepository instance.
In my controller, I am only mapping the POST operator because I don't want my clients to be able to GET, PUT or DELETE data from the service.
During a security scan today, I discovered that the service is exposing a /eventsEntities endpoint, which appears to be mapping all of the CrudRepository verbs into the REST endpoint.
Any idea how I managed to enable this automatic endpoint and more importantly, how to disable it? I'm using Spring Boot 1.2.2.
After some additional digging, I realized that I had inadvertently included org.springframework.boot:spring-boot-starter-data-rest in my compile dependencies. That starter includes spring-data-rest-webmvc, which exposes JPA data over REST. Removing that dependency resolved the issue.
Hope my realization helps someone else in the future.
I have an application that when it was in the root of the site worked fine. I put it in a subdirectory to test compatibility and it breaks. The structure is as follows:
/cfc/
rest/ -- Rest endpoints
model/ -- ORM model mappings
util/ -- some util classes
It's a pretty simple crud that also gets the metadata for the models for use in the front end. Basically, any calls from the rest endpoints or cfc's called from the rest endpoints will encounter an error when it's dealing with anything that requires pathing. For example:
getComponentMetaData("models.table");
errors cannot find componenet models.table. This is using a mapping to /cfc/model, if I try cfc.model.table, same thing happens, as well as ApplicationName.cfc.model.table.
I have a feeling this is due to how CF is registering the rest endpoints, since it works as a root application, but just stalls out like this when it's in a subdir. Anyone have any insight on anything that can be done or how CF handles the registration that there might be a work around to it?
I am modifying some legacy project using SOAP web services. I noticed that some of the URLs it is pointing to for some of the namespace are not working anymore (500). Any idea what the consequence would be?
Both the client and server seems to be working fine still, but I need to make a new client that consumes the WS.
Namespaces may be in the form of a URL, but they do not represent a resource on the network. In many cases, there never was any resource at that location. It makes no difference at all.