Skip to content

Instantly share code, notes, and snippets.

⏺ Problem
@ApiModelProperty(extensions = ...) in SpringFox 3.0.0 had two bugs preventing vendor extensions from appearing in the generated OpenAPI JSON at /v3/api-docs:
Bug 1: Extensions not injected into schema
SpringFox parses @ApiModelProperty extensions internally but its ModelPropertySerializer silently drops them — they never make it into the Schema objects in the OpenAPI spec. This is a
known bug in the abandoned SpringFox 3.0.0 codebase.
Bug 2: Extensions serialized incorrectly
package com.schooldevops.apifirst.apifirstsamples.config;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.Schema;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
provider "aws" {
region = var.region
}
data "aws_security_group" "default" {
name = "default"
vpc_id = module.vpc.vpc_id
}
module "vpc" {
@saillinux
saillinux / placeFileInAllGithubRepos.php
Created June 20, 2019 15:36 — forked from bchecketts/placeFileInAllGithubRepos.php
Quick script to place a single file in every repository in your Github organization
<?php
## Generate a Github user token at https://github.com/settings/tokens
$githubToken = 'EnterYourGithubTokenHere';
## Your organization name (from https://github.com/yourOrganizationName)
$organization = 'yourOrganizationName';
## Enter the name of the remote file you want to place
$remoteFile = "pull_request_template.md";
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
@saillinux
saillinux / meeting.org
Created January 17, 2019 03:17
meeting.org

Meeting Agenda

Things we provide

  • Provisioning
  • Governance
  • Acounting and Cost reduction

branch strategies

monitoring

  • Prometheus/Grafana

Pipeline

# 모든 값을 키별로 더해서 합을 구하는데 사용 하는 해쉬
my %sums;
# __DATA__에 정의 되 값을 하나 하나 씩 읽어 들임
while (my $line = <DATA>) {
# AA 1을 split을 이용해서 스페이스로 나누고 @F에 결과 값을 저장 $F[0]에는 AA가 저장 $F[1]에는 1이 저장됨
my @F = split / /, $line;
# 아래를 풀이 하면 $sums{'AA'} += 1 즉 해쉬의 키는 유니크 하기 때문에 F[0]를 키로 이용해서 F[1]을 다 더함
$sums{$F[0]} += $F[1];
@saillinux
saillinux / dag_scheduler.pl
Created December 20, 2013 11:57
DAG Scheduler in perl
use strict;
use warnings;
use Graph;
use Data::Dumper;
use JSON;
use Capture::Tiny ':all';
use constant {
WAITING => 0,
RUNNING => 1,