Comments (4)
Great! Now it's much better!
2022-03-21T01:57:43.635+0000|INFO|10|main|[+--------------------------+]
2022-03-21T01:57:43.636+0000|INFO|10|main|[| A P I S i m u l a t o r |]
2022-03-21T01:57:43.636+0000|INFO|10|main|[+--------------------------+]
2022-03-21T01:57:43.639+0000|INFO|10|main|[API Simulator initialization in progress...]
2022-03-21T01:57:43.639+0000|INFO|10|main|[API Simulator: {java version:"11.0.14.1+1", jvm name:"OpenJDK 64-Bit Server VM", jvm version:"11.0.14.1+1", jvm pid:10}]
2022-03-21T01:57:43.640+0000|INFO|10|main|[API Simulator: implementation {title:"API Simulator",version:"1.10"}]
2022-03-21T01:57:43.640+0000|INFO|10|main|[API Simulator: args=[-c, /apisimulator/apisimulator-http-1.10/config, -s, /home/apisimulator/simulations/simlets, /home/apisimulator/simulations, -retain_dsl_models]]
2022-03-21T01:57:43.655+0000|INFO|10|main|[Loading configuration from '/apisimulator/apisimulator-http-1.10/config/apisim.yaml'...]
2022-03-21T01:57:43.689+0000|INFO|10|main|[Loaded admin configuration]
2022-03-21T01:57:43.693+0000|INFO|10|main|[Loaded simulator configuration]
2022-03-21T01:57:43.696+0000|INFO|10|main|[Loaded simulation configuration]
2022-03-21T01:57:43.726+0000|INFO|10|main|[Loaded 2 simlets in 71 ms]
2022-03-21T01:57:43.728+0000|INFO|10|main|[Loading simlets from '/home/apisimulator/simulations/simlets'...]
2022-03-21T01:57:44.306+0000|ERROR|10|main|[com.apisimulator.http.dsl.HttpSimletDsl.deserialize(DeserializerContext, DslConfig): java.lang.IllegalArgumentException: The URI's host shall not contain scheme or port number. host='https://api-simulator.free.beeceptor.com']
Exception in thread "main" 2022-03-21T01:57:44.306+0000|INFO|10|main|[Loaded 1 simlet in 578 ms]
java.lang.IllegalArgumentException: The URI's host shall not contain scheme or port number. host='https://api-simulator.free.beeceptor.com'
at com.apisimulator.http.dsl.callback.HttpCallbackDsl.deserialize(Unknown Source)
at com.apisimulator.http.dsl.callback.Http1CallbackDsl.deserialize(Unknown Source)
at com.apisimulator.http.dsl.callback.HttpCallbackDispatcher.deserialize(Unknown Source)
at com.apisimulator.http.dsl.response.HttpResponseDsl.processResponseConfig(Unknown Source)
at com.apisimulator.http.dsl.response.HttpResponseDsl.processAllResponsesConfig(Unknown Source)
at com.apisimulator.http.dsl.response.HttpResponseDsl.deserialize(Unknown Source)
at com.apisimulator.dsl.ConfigurableDslDeserializer.driveMapDeserialization(Unknown Source)
at com.apisimulator.dsl.ConfigurableDslDeserializer.processObject(Unknown Source)
at com.apisimulator.dsl.ConfigurableDslDeserializer.deserialize(Unknown Source)
at com.apisimulator.http.dsl.HttpSimletDsl.deserialize(Unknown Source)
at com.apisimulator.config.HttpSimletDslMapDeserializer.doDeserialize(Unknown Source)
at com.apisimulator.dsl.DslConfigMapDeserializerBase.deserialize(Unknown Source)
at com.apisimulator.http.dsl.HttpSimletDslConfigLoaderBase.loadFromStream(Unknown Source)
at com.apisimulator.http.dsl.HttpSimletDslConfigLoaderBase.loadFromFile(Unknown Source)
at com.apisimulator.config.HttpSimletPerFileLoader$1.process(Unknown Source)
at com.apisimulator.io.DirectoryTreeWalker.walk(Unknown Source)
at com.apisimulator.io.DirectoryTreeWalker.walk(Unknown Source)
at com.apisimulator.io.DirectoryTreeWalker.walk(Unknown Source)
at com.apisimulator.io.DirectoryTreeWalker.walk(Unknown Source)
at com.apisimulator.io.DirectoryTreeWalker.walkTree(Unknown Source)
at com.apisimulator.config.HttpSimletPerFileLoader.loadFromDir(Unknown Source)
at com.apisimulator.HttpAPISimulatorInit.initSimulation(Unknown Source)
at com.apisimulator.APISimulator.doInit(Unknown Source)
at com.apisimulator.launcher.AbstractLaunchable.init(Unknown Source)
at com.apisimulator.launcher.AbstractLaunchable.launch(Unknown Source)
at com.apisimulator.APISimulator.main(Unknown Source)
from apisimulator.
OK, it works if https://
is removed from response.callback.http1.uri.host
😅
Not sure if this is something you might want to explicitly state in the documentation, accept the protocol as part of the hostname, or fail the simlet when it loads because of that 🤔
from apisimulator.
The documentation for host
states that "Host can be a DNS name or an IP address".
It may be hard to predict all possible misconfigurations (e.g. appending a port number as well)...but I can understand how some checks can improve the experience by failing with a descriptive message at startup-time instead of run-time.
from apisimulator.
This enhancement was included in the just released v1.10.
Give it a try when you get a chance, @x80486.
Thanks!
from apisimulator.
Related Issues (20)
- Enable HTTPS in APISimulator HOT 9
- (not equals) Matching Operations is not working properly HOT 5
- Support "file" as source for callbacks' request body HOT 5
- Allow to read request body on the fly HOT 2
- Config file for environment-specific settings HOT 1
- Enhance callback workflows with assertions as well HOT 2
- Enhance DSL to loop from data sources HOT 3
- Returning data from multiple files stored in the simulation HOT 3
- Consider using `Eclipse Temurin` and `Alpine` instead HOT 4
- Getting intermittently error "java.net.BindException: Address already in use: connect" HOT 2
- The first data line in a CSV is not matched/retrieved (data provided through simlet's yaml configuration) HOT 2
- Does the SQL Data Store feature support other databases than H2? HOT 1
- Folder organization and 404 on simlet HOT 2
- Support for gRPC
- Augment Template Functions HOT 2
- Short-Circuit Use of External Files HOT 4
- Tricky Type Inference With External JSON Files HOT 7
- Support for Server-Side Events / Streaming Endpoint HOT 3
- Better logging when matching simulations HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apisimulator.