Not Found http://localhost:3000/openapi.json -loopback 3 - loopback

Please help me,I'm stuck at this point.
Steps done succesfully,
1)Install loopback 3
2)datasource is created ,generated models from mysql and generator script
3)updated model-config.json
4)loopback has run with no errors
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
---This was command prompt
5)when trying to access that Not Found http://localhost:3000/openapi.json

LoopBack 3 does not support OpenAPI v3, we support the older v2 specification only (it's usually referred to as Swagger).
The API spec in Swagger JSON format is available at the following URL:
http://0.0.0.0:3000/explorer/swagger.json
Please check out the recently announced LoopBack 4 version if you are interested in OpenAPI v3: the announcement and the new website.

I faced same error
Clear your browser cache then run URl
http://localhost:3000/explorer

Related

Keycloak fastapi integation

I am trying to build an app, with fastapi. I was trying to use keycloak for authentication part,
from fastapi_keycloak import FastAPIKeycloak, OIDCUser
app = FastAPI()
idp = FastAPIKeycloak(
server_url="https://auth.some-domain.com/auth",
client_id="some-client",
client_secret="some-client-secret",
admin_client_secret="admin-cli-secret",
realm="some-realm-name",
callback_uri="http://localhost:8081/callback"
)
idp.add_swagger_config(app)
I am using version 20.0 and someone recommended to not use http:// when providing server url.
I followed this process for integration https://fastapi-keycloak.code-specialist.com/#apppy as per this documentation. Now when I am giving my server url starting with http:// it shows throws an error, i.e. MissingSchema: Invalid URL 'None': No scheme supplied. Perhaps you meant http://None? and without http://
InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for this is the result.
Can someone please look into this and help me out.
Thank you InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for
FastAPi not support v20.0, it supports v16.1.x(latest version v16.1.1)
So you can't using with v20.0
I tested this docker compose and app.py
This is access roles API to FastAPI
http://localhost:8081/roles

Couchbase 4.1 - N1QL by endpoint

I use Reactive Couchbase (this is Scala port for Java SDK - https://github.com/ReactiveCouchbase/ReactiveCouchbase-core)
And for query this use http endpoint (http:// mycouchbaseadress:8093 /query?q=N1QL Comand) but response for server is "Unrecognized parameter in request: q".
I Find in stackoverflow to start cbq-engine so try to launch 'cbq-engine -couchbase http:// mycouchbaseadress:8093 /' but have error ''flag provided but not defined: -couchbase"
My couchbase version is 4.1 community
Do you know how I can send my n1ql query to server by endpoint?
It seems like there is a bug in ReactiveCouchbase, or at least its N1QL support was developed against an outdated beta version of the feature.
With Couchbase Server 4.0 GA and above, you don't need to run cbq-engine (this was the process used during N1QL's beta).
The problem is that in the code, the q= parameter is used where it should now be statement= (or a JSON body).
There is a open pull-request that happens to fix that issue among other things, but it's been opened a long time.

How to run Identity Server V3 client examples

I'm trying to run some of the examples from here. They're configured to access localhost:44333 - if I run one of the examples, e.g. JavascriptResourceOwner, the calls to that address are not getting any response. What project/solution should I be running on that port?
You should run IdentityServer in separate solution for example from example
IdentityServer3.AspNetIdentity
All client samples are designed to be run with the core project host:
https://github.com/IdentityServer/IdentityServer3

wso2 api manager 1.6.0 publisher - published api call to addAPI silently fails

WSO2 API Manager 1.6.0 introduced a new problem, a REST Post to addAPI returns success but the added API record is incomplete, thus unusable. Inspecting the log file, I traced the issue to /publisher/site/themes/default/templates/overview/template.jag#3, a change in the jaggery file template.jag causes a java null pointer exception on line 3 with the following code 'var endpoint_config = parse(api.endpointConfig);'
With API Manager 1.5.0 this same REST API call worked but it took 3 min to complete on a VMWare box running SLES 11 SP2. Adding an API via the web interface also took 3 min. Trying both on Mac OS X and Windows, it took about 3 secs to run. With API Manager 1.6.0 on the same environments, the web interface now runs under 6 secs and the added API is correct. Now adding an API via the REST call results in an incomplete record being created, tested on both VMWare with SLES 11 SP2 and Mac OSX Mavericks.
Anyone experienced this issue?
It seems documents related to publisher APIs have not been updated yet. With API Manager 1.6.0 there has been a change in the way endpoints are stored. To make the REST API call working can you try with a request similar to following;
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d"action=addAPI&name=YouTube1&context=%2Fyoutube1&version=1.0.0&tier=Gold&responseCache=disabled&visibility=public&endpoint_config=%7B%22production_endpoints%22%3A%7B%22url%22%3A%22http%3A%2F%2Fgdata.youtube.com%2Ffeeds%2Fapi%2Fstandardfeeds%2Fmost_popular%22%2C%22config%22%3Anull%7D%2C%22endpoint_type%22%3A%22http%22%7D&endpointType=nonsecured&subscriptions=current_tenant&resourceTemplate=%2F*&resourceCount=0&resourceMethod-0=POST&resourceMethodAuthType-0=Application&uriTemplate-0=%2F*&resourceMethodThrottlingTier-0=Unlimited&tiersCollection=Gold"
When decoding the request you can see that endpoint is now defined as a JSON
endpoint_config={"production_endpoints":{"url":"http://gdata.youtube.com/feeds/api/standardfeeds/most_popular","config":null},"endpoint_type":"http"}

Sending events to the dev version of a ruleset via HTTP

I've been writing an endpoint that sends events to a KRL ruleset via HTTP GET (based on the documentation here), in this format:
http://cs.kobj.net/blue/event/{domain}/{eventname}/{appid}
That works great when the version of the app I want to test is the same one that's deployed. I don't always want to deploy before testing it, though. Using the stated format for calling the dev version doesn't work. It still calls the deployed version of my ruleset:
http://cs.kobj.net/blue/event/{domain}/{eventname}/{appid}:kynetx_app_version=dev
What am I doing wrong?
{appid}:kynetx_app_version=dev
is a query parameter so it needs to come after a '?' or a '&'
Changing your query to the following should get it to work
http://cs.kobj.net/blue/event/{domain}/{eventname}/{appid}/?{appid}:kynetx_app_version=dev