I have a flask app using connexion to serve a swagger API and it's help.
app.add_api('_v1.yaml', base_path='/api/v1', validate_responses=True)
I added a custom route to the built files of my angular project:
# Frontend (Angular dist) and assets
@app.route('/')
@app.route('/<path:filename>', methods=['GET'])
def root(filename='index.html'):
return send_from_directory('../../frontend/trackl-angular/dist/trackl-angular', filename if '.' in filename else 'index.html')
The first time I visit my page (without cache), the route http://localhost:8080/api/v1/ui works correctly and I see the swagger API help. Then, when I open the angular app the first time, I can't acces my custom route anymore. The index html is always returned and the network tab in chrome tells me "service worker" as source. I'm using @angular/pwa to have a proper PWA out of my angular app.
Can someone help me to figure out how to serve my swagger ui, so the PWA concept doesn't to to extract something from the cache?
Thanks