Skip to content

ElasticSearch Error : Failed to update template: Request failed with status code 400 #296

Description

@nagarobo

Issue Description

I am using swagger-stats with Elasticsearch 8.6.0 (official Docker image), configured as follows:
• Elasticsearch version: 8.6.0
• swagger-stats version: 0.99.7
• Elasticsearch running with security enabled (xpack.security.enabled=true)
• Basic authentication enabled with elastic user and password

When swagger-stats tries to update the index template in Elasticsearch, I get the following error:

sws:elastic Failed to update template: Request failed with status code 400 +0ms

My configuration

const app = express();
const port = 3000;
const swaggerSpec = require('./petstore.json');
app.use(swStats.getMiddleware({
  name: 'swagger-stats-testapp',
  version: '0.99.7',
  timelineBucketDuration: 60000,
  uriPath: '/swagger-stats',
  swaggerSpec: swaggerSpec,
  elasticsearch: 'http://localhost:9200',
  elasticsearchUsername:"elastic",
  elasticsearchPassword:"admin123"
}));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions